[Zope-CMF] CMF caching policy manager

alan runyan alan runyan" <runyaga@runyaga.com
Thu, 15 Aug 2002 16:01:38 -0500


what about potential wiring this in for *all* FSObjects?
so that if you have a caching_policy_manager than it overrides the
HEADER manipulations that come stock. i.e. CMFCore.FSImage.index_html

what about DTML methods or .CSS/.JS ? these should probably reach into the
caching policy manager as well?

~runyaga

----- Original Message -----
From: "Tres Seaver" <tseaver@zope.com>
To: "Geoff Davis" <geoff@geoffdavis.net>
Cc: "Zope CMF" <zope-cmf@zope.org>; "Plone Developers"
<plone-developers@lists.sourceforge.net>
Sent: Thursday, August 15, 2002 3:48 PM
Subject: Re: [Zope-CMF] CMF caching policy manager


> On Thu, 2002-08-15 at 14:49, Geoff Davis wrote:
> > Hi all--
> >
> > The CMF Caching Policy Manager looks potentially quite cool, but I'm a
> > little unclear on the best way to use it.  It looks like one somehow
needs
> > to invoke something like
> >
> >
response.setHeaders(self.getattr('name_of_caching_policy_manager').getHTTPCa
> > chingHeaders(bunch of params here))
> >
> > in a page template.  That's kind of ugly, but if placed in a common
header
> > or macro somewhere, doesn't seem too bad.
> >
> > Has anybody actually used the Caching Policy Manager?  Any pointers on
good
> > practices?  Can anyone enlighten me as to all the params required to set
up
> > the TALES expressions?  (content, view_method, keywords, time)
>
> 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.  Here is what FSPageTemplates do, BTW (inside
> pt_render)::
>
>     if REQUEST:
>
>         content = aq_parent( self )
>
>         mgr = getToolByName( content
>                             , 'caching_policy_manager'
>                             , None
>                             )
>
>         if mgr:
>             view_name = self.getId()
>             RESPONSE = REQUEST[ 'RESPONSE' ]
>             headers = mgr.getHTTPCachingHeaders( content
>                                                 , view_name
>                                                 , extra_context
>                                                 )
>             for key, value in headers:
>                 RESPONSE.setHeader( key, value )
>
> Tres.
> --
> ===============================================================
> Tres Seaver                                tseaver@zope.com
> Zope Corporation      "Zope Dealers"       http://www.zope.com
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>