On Fri, Sep 12, 2003 at 10:13:44AM -0400, Tres Seaver wrote: > The CMF's CachingPolicyManger, which is specialized for caching skin > methods, already has such customizations: it allows spelling the > 'Last-Modified' header using a TALES expression, and also has checkboxes > for the 'no-cache', 'no-store', and 'must-revalidate' options of the > 'Cache-Control' header.
Based on that note I decided to try CachingPolicyManager for the first time, and I'm confused about how it's supposed to work. In a CMF/Plone portal instance (CMF 1.4) I created a CMF Caching Policy Manager object. If I create a policy instance with default Predicate and Mod. Time values and a Max age of 999, FSImage objects are then published with appropriate cache control headers so that they expire after 999 seconds. Cool. But I can't see how to create more restrictive Predicate. My initial attempt was to set Predicate like so: python: content.meta_type == 'Filesystem Image' But that predicate never seems to return true. Looking at _setCacheHeaders() in CMFCore/utils.py, 'content' is set to 'aq_parent(obj)'. Because of that, any tests against 'content' in the Predicate apply to the Filesystem Directory View that contains the particular FSImage objects, rather than to the FSImage object itself. What good is that? -- Fred Yankowski [EMAIL PROTECTED] tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )