[Zope-dev] AW: [Summary] Caching prob with AHCM and headers
Fred Yankowski
fred at ontosys.com
Thu Sep 18 11:29:07 EDT 2003
On Thu, Sep 18, 2003 at 11:09:57AM +0100, seb bacon wrote:
> I use squid, which doesn't require last-modified headers. I guess
> that's not an option for you, or you'd probably already be using it ;-)
> But in any case, I don't see why Shane's suggestion of uncommenting
> the last-modified line shouldn't work.
I use Squid as an HTTP accelerator in front of ZServer. What do
last-modified headers have to do with this discussion? Anyway, I have
a strong preference for working with stock code, rather than patching
Zope itself or any of the products.
> I use a standard HTTP Cache Manager for all our caching needs - I have
> yet to find the granuality allowed by CPM necessary.
Aha, I didn't realize that an HTTP Cache Manger can now handle FSDV
objects. That does seem to make the CMF CPM unnecessary for my
purposes. (I'm using Zope 2.6.1, CMF 1.4, and Plone 1.1alpha2).
> (BTW, in the CMF you can associate FS Objects with named cache managers
> by adding a file called foo.dtml.metadata with the following contents::
I'm able (I realize just now) to associate FS objects with an HTTP
Cache Manager directly from the cache managers Associate tab in the
ZMI, just like other cache-managable types.
> The only class of request for which I need to have a separate policy is
> requests from people who are actually editing a site. I have created a
> customised HTTP Cache Manager which doesn't cache requests for specified
> URLs. I then instruct site editors to edit the site using, e.g.
> 'edit.mysite.com' and to view it using 'www.mysite.com'.
Interesting approach.
An HTTP Cache Manager has properties allowing it to be associated with
an external "downstream" cache such as Squid, so that when a cached
object is updated in Zope the cache manager notifies the external
cache to purge the corresponding URL. But my few experiments with
that (some months back, on an earlier version of Zope) showed that
Zope would send a NOTIFY message with a different URL than the one
that squid had associated with particular object, apparently because
of URL path transformations caused by virtual hosting and/or skin
lookup; so the old version of the updated object would remain in the
squid cache. I wonder if that works better now. I'll try a few
tests...
P.S. Even if the NOTIFY interaction above worked right, that still
would not address the problem where a page template does not change,
but the generated content on that page does. I can see where a site
author/editor might want to get a fresher view of such pages than is
necessary for a random visitor.
--
Fred Yankowski fred at ontosys.com 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
More information about the Zope-Dev
mailing list