[html-formfu] Caching FormFu objects
Ronald J Kimball
rkimball+formfu at pangeamedia.com
Tue Nov 18 18:16:48 GMT 2008
I'm using FormFu in an application that gets a fair amount of traffic,
and creates the same forms over and over again.
I had the idea to cache the FormFu objects in memcached, rather than
create them from scratch every time. This works as long as the cached
object is retrieved in the same process. However, if the object is
retrieved in another process, then some of the HTML::FormFu modules may
not have been loaded, leading to errors such as the following:
[error] Couldn't render template "undef error - Can't locate object
method "process" via package "HTML::FormFu::Deflator::CompoundSplit" at
/home/rkimball/svn/pangea/trunk/site_perl/HTML/FormFu/Element/_Field.pm
line 625.
"
I know that this is not specifically a memcached/HTML::FormFu issue, but
rather a general issue with serializing objects. I'm not sure what a
general solution would be, however, especially because package names
don't necessarily correspond directly to module files. So I'm wondering
if anyone else has tried caching FormFu objects, if they encountered
this problem, and how they dealt with it in this specific case.
thanks,
Ronald
More information about the HTML-FormFu
mailing list