Caching prob with AHCM and headers, was:[Zope] Caching prob
with headers or reverse proxy?
Janko Hauser
jh@comunit.de
Fri, 25 Apr 2003 13:52:59 +0200
On Fri, 25 Apr 2003 13:24:22 +0200
"Germer, Carsten" <carsten.germer@desy.de> wrote:
> Well I did some more research:
> AHCM does _not_ work out of the box, at least not with Apache as
> cache in front.
> Setting the headers via a dtml-method indeed does.
> With AHCM there are headers set but these don't trigger the caching,
> the headers I set with DTML do the trick. Maybe it's just a simple
> glitch in AHCM?
>
The correspondig code in Zope2.6.1 in AHCM looks like this
if not anon and self.anonymous_only:
return
# Set HTTP Expires and Cache-Control headers
seconds=self.interval
expires=rfc1123_date(time.time() + seconds)
# RESPONSE.setHeader('Last-Modified',rfc1123_date(time.time()))
RESPONSE.setHeader('Cache-Control', 'max-age=%d' % seconds)
RESPONSE.setHeader('Expires', expires)
So specifically the last modified is commented out. I presume there
was a reason for this. I need to do some digging in the mailing
archives and the cvs logs first.
__Janko