[Zope-CMF] RAM Cache and CMF objects?

Tres Seaver tseaver@zope.com
Thu, 21 Mar 2002 06:52:43 -0500


seb bacon wrote:
> This was discussed a while ago, for an answer see:
> 
>   http://lists.zope.org/pipermail/zope-cmf/2001-November/010577.html
> 
> This is a fairly high priority for me.  ZCers, what do *you* do about
> caching, considering you use the CMF for most of your consulting?
> 
> I'll be investigating in more depth soon.

I can't imagine ever wanting to use RAM caching for full pages;  you
are "robbing Peter to pay Paul" there, inevitably.  Instead, we are
focusing heavily on improving our interactions with external HTTP
servers (notably Squid).

I will be committing a "caching tool" branch to the head before the
CMF 1.3 release;  for the moment, you can view that branch at:

 
<http://cvs.zope.org/CMF/CMFCore/Attic/CachingPolicyManager.py?rev=1.1.2.2&content-type=text/vnd.viewcvs-markup&only_with_tag=tseaver-caching_tool-branch>

<http://cvs.zope.org/CMF/CMFCore/FSPageTemplate.py?rev=1.4.2.1&content-type=text/vnd.viewcvs-markup&only_with_tag=tseaver-caching_tool-branch>

The first module is new:  it captures a set of caching policies as
rules, where each policy has a predicate (a TALES expression) and
a set of HTTP caching header specifications.  When the tool is
invoked, it finds the first rule which matches and uses it to
add headers to the request.  I have modified FSPageTemplate (and may
modify FSDTMLMethod) to look for this tool and invoke it, if found.

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