[Zope-CMF] Re: using caching policy manager to cache anon vs. auth content

Tres Seaver tseaver at zope.com
Tue Aug 24 17:11:03 EDT 2004


Gerry Kirk wrote:
> Hi,
> 
> I would like to cache all pages for anon users, but then when someone 
> logs in, the cache would no longer apply.
> 
> Is it possible to do on the same domain? My experiments tell me 'no'.
> 
> I have the following set-up, copying an example from a Nuxeo whitepaper:
> 
> policy: anon
> predicate: member == none
> mod time: content/bobobase_modification_time
> max age (secs): 3600
> 
> policy: authenticated
> predicate: member != none
> mod time: content/bobobase_modification_time
> max age (secs): 0
> no-cache: true

The predicate is a TALES path expression by default.  I think the 
spelling you want is:

   - 'not: member' (for anonymous)

   - 'member' (for authenticated)

You could also spell out the Python bit:

   - 'python:  member == None'

   - 'python:  member != None'

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



More information about the Zope-CMF mailing list