On Fri, 28 Jul 2000, Drew Taylor wrote:
> Andy Wardley wrote:
> > 
> > And the REALLY, REALLY smart ones (i.e. TT2) can write the Perl code to
> > disk for persistance of compiled templates.  That way, the templates
> > never need to be re-compiled (i.e. from TT syntax to Perl code) unless
> > you change them.  They can simply be loaded via Perl's require().
> What about having a shared memory cache ala HTML::Template? A disk cache
> is great, but I have RAM to spare at the moment. Any plans for a shared
> in-memory cache? (Someone had pointed out that TT does have in memory
> caching, but it is only per-process.)

You can't actually share the compiled subs (except through copy-on-write
by loading them in startup.pl), and sharing the generated perl code in
memory rather than on disk is probably not that worth the extra work (or
memory).  The key here is that the loading of the perl code from disk into
memory is only done once per process, so the value in optimizing this step
is very small.

- Perrin



Reply via email to