On Tue, 31 Jul 2001, Perrin Harkins wrote:

> +------------+
> | LONG TTL   |
> |            |
> +------------+
> | short TTL  |
> +------------+
> |            |
> | LONG TTL   |
> +------------+
> 
> It's lame to have to cache these two long TTL pieces separately, since
> they're really one section, but it avoids doing anything tricky to
> handle the short TTL piece in the middle (the user's name or something).

What if you have many short TTL pieces, all with separate TTLs?  That no
longer becomes an easy alternative, but it does stay ugly :-).  As I was
thinking about this last night I realized that it would be more correct
to have the template itself specify its Town TL.  Why should an outer
template know the TTL of an inner template?  Unfortunately, this almost
certainly means that the caching would need to be more tightly integrated
with TT than a plugin.  Maybe an idea for v3?

And a proposed syntax:
[% BLOCK %] (also at template level)
        [% META cache-ttl=3600s cache-loc=mem cache-keys=[...] %]

[% END %]

If this level of caching were to be integrated into TT, then I would love
to see an option to cache in memory instead of on disk.  Got to do
something with that unused 3G of RAM... might as well speed up the site.

++t

Tony Payne  :  Sr. Software Engineer  :  PETsMART.com  :  626-817-7151



Reply via email to