Octavian Râşniţă wrote:
Well, I think I understand now... or not? :-)
A user accesses the form. This creates a cached version of the form. A
second user gets the form from the cache and adds data to it. Without
cloning the form, the data would be stored by reference in the cache or
something like that, and the other users would also get it.
I just thought that once the user gets the form from the cache, no
matter what it does to that form, his changes can't propagate back to
the cache so no cloning was needed... I hope I understood correctly.
That depends on how your cache is implemented. If you're caching the
form object in memcached, for example, then you have to freeze and thaw,
and every time you fetch from the cache you're automatically creating a
new object. If you're caching the form object by simply keeping a
reference to it in the current process, then you have one object that
you're reusing repeatedly. The cache in this case is the latter, so
that's why the cloning is necessary.
Ronald
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu