[Zope-CMF] CMF caching policy manager

Tres Seaver tseaver@zope.com
20 Aug 2002 12:56:20 -0400


On Thu, 2002-08-15 at 17:04, Geoff Davis wrote:
> > FSPageTemplates already do this by default.  Customized ones won't,
> > which is one reason I have contemplated using a derived-from-ZPT class
> > for skin methods;  the "stock" ZPTs can be cached, but they use a whole
> > other mechanism.
> 
> Ok -- so let me make sure I understand correctly.  If I create filesystem
> ZPT in a skin, the policies in the Cache Policy Manager will be applied?
> But if I customize a skin through the web, the Policy Manager won't be
> invoked?  Or am I completely off base here?

Nope;  I'd like to fix this, as I described in a note to Alan.

> Suppose I have a class of ZPT's that are basically static, and another with
> forms on them that I never want cached.  What's the easiest way to set a
> flag that the Cache Policy Manager will see when testing its predicates?
> Something in the ZPT?  Something external via the ZMI?

The template itself is available to the predicate expression, bound to
the 'view' name.  If you can arrange for the template to have a property
associated with it (e.g., using the '.properties' file), then the
predicate could check for that property.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com