[Templates] Negative Caching
Bill Moseley
moseley@hank.org
Fri, 9 Feb 2007 12:49:15 -0800
I'm using a combination of a database and file system storage for
templates. I use $STAT_TTL to keep from hitting the mostly static
template very often.
I also use more than one path in INCLUDE_PATH and unfortunately, most
of the template "hits" are in the last path listed in INCLUDE_PATH.
Since only found templates are in the cache, and STAT_TTL only applies
to items in the cache, every request still stats all the template
paths in INCLUDE_PATH dirs
Anyone else dealt with this issue before?
I'm thinking that implementing a negative cache -- one that tracks
templates not found and uses STAT_TTL also to avoid looking too often
for paths that have already been found to be missing. Does that
seem like a reasonably good solution?
--
Bill Moseley
moseley@hank.org