[Templates] Cache compiled templates.

Perrin Harkins perrin@elem.com
Fri, 29 Mar 2002 10:09:32 -0500


Alexei V. Alexandrov wrote:
>  The question is very simple: i would
>  like to use BerkeleyDB as a cache storage and was thinking about the
>  performance. Will caching to a storage different from file cache will
>  increase performace? Or is it better to cache the real template output than
>  the compiled one? Has anyone done some sort of investigations on this matter?

You may not be understanding what the cache is for.  It does not cache 
output at all.  It caches the compiled (to Perl) version of the 
templates.  Each process using these templates would read them from the 
cache at most once.  In other words performance of the cache itself is 
almost irrelevant since there are so few accesses.

- Perrin