>>>>> "Andrew" == Andrew Light <[EMAIL PROTECTED]> writes:

Andrew> I am currently running my web-app under mod_perl, but as far as I can
Andrew> see, none of the dynamic pages, put together using the TT is being
Andrew> chached.

a) Don't create the Template object on each hit.
b) Be sure CACHE_SIZE is undef, or set to a high value.
c) Set COMPILE_DIR to some place that the web process can write.

Step "a" is easy to get wrong, if you're converting CGI code to simply
using the Apache::Registry hack.  Be sure you have something like:

      our $engine ||= Template->new(...);

rather than:

      my $engine = Template->new(...);

which is how it would typically be written in CGI.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to