Caching prob with AHCM and headers, was:[Zope] Caching prob with headers or reverse proxy?

Germer, Carsten carsten.germer@desy.de
Fri, 25 Apr 2003 13:24:22 +0200


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?

Question front up: Can anyone tell about how to write a general global
procedure/function/object that is called every time when any object is
delivered? I would use that to test functionality before later maybe =
putting
it into AHCM. Any hint?

Here comes the headers and the logs, remember, Zope with caching Apache =
in
front:

Plain, without anything
-----------------------
Header:
  HTTP/1.1 200 OK
  Date: Fri, 25 Apr 2003 11:04:24 GMT
  Server: Zope/(Zope 2.6.1 (source release, python 2.1, linux2), python
2.2.2, linux2) ZServer/1.1b1
  Content-Length: 357
  Etag:
  Content-Type: text/html
  Via: 1.1 wof1.desy.de (Apache/1.3.27)
  X-Cache: MISS from wof1.desy.de
  Connection: close
Apache:
  131.169.40.79 - - [25/Apr/2003:13:04:24 +0200] "GET
/Germerstuff/dritte_seite HTTP/1.0" 200 357 "-" "Lynx/2.8.3dev.9
libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6a"
Zope:
  131.169.40.79  - Anonymous [25/Apr/2003:13:04:24 +0200] "GET
/VirtualHostBase/http/wof1.desy.de:80/VirtualHostRoot/Germerstuff/dritte=
_sei
te HTTP/1.1" 200 586 "" "Lynx/2.8.3dev.9 libwww-FM/2.14 SSL-MM/1.4.1
OpenSSL/0.9.6a"

With AHCM
---------
Header:
  HTTP/1.1 200 OK
  Date: Fri, 25 Apr 2003 10:59:44 GMT
  Server: Zope/(Zope 2.6.1 (source release, python 2.1, linux2), python
2.2.2, linux2) ZServer/1.1b1
  Content-Length: 357
  Etag:
  Cache-Control: max-age=3D3600000
  Expires: Fri, 06 Jun 2003 02:59:44 GMT
  Content-Type: text/html
  Via: 1.1 wof1.desy.de (Apache/1.3.27)
  X-Cache: MISS from wof1.desy.de
  Connection: close
Apache:
  131.169.40.79 - - [25/Apr/2003:12:59:44 +0200] "GET
/Germerstuff/dritte_seite HTTP/1.0" 200 357 "-" "Lynx/2.8.3dev.9
libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6a"
Zope:
  131.169.40.79  - Anonymous [25/Apr/2003:12:59:44 +0200] "GET
/VirtualHostBase/http/wof1.desy.de:80/VirtualHostRoot/Germerstuff/dritte=
_sei
te HTTP/1.1" 200 658 "" "Lynx/2.8.3dev.9 libwww-FM/2.14 SSL-MM/1.4.1
OpenSSL/0.9.6a"


With headers set via DTML
-------------------------
Header:
  HTTP/1.1 200 OK
  Date: Fri, 25 Apr 2003 11:09:38 GMT
  Server: Zope/(Zope 2.6.1 (source release, python 2.1, linux2), python
2.2.2, linux2) ZServer/1.1b1
  Last-Modified: Fri, 25 Apr 2003 11:02:32 +0000
  Content-Length: 301
  Expires: Fri, 25 Apr 2003 12:09:26 +0000
  Content-Type: text/html
  Via: 1.1 wof1.desy.de (Apache/1.3.27)
  Age: 12
  X-Cache: HIT from wof1.desy.de
  Connection: close
Apache:
  131.169.40.79 - - [25/Apr/2003:13:09:38 +0200] "GET
/Germerstuff/dritte_seite HTTP/1.0" 200 301 "-" "Lynx/2.8.3dev.9
libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6a"
Zope:
  No hit, like desired.





> -----Urspr=FCngliche Nachricht-----
> Von: Dylan Reinhardt [mailto:zope@dylanreinhardt.com]
> Gesendet: Donnerstag, 24. April 2003 16:05
> An: Germer, Carsten
> Cc: 'zope@zope.org'
> Betreff: Re: AW: [Zope] Caching prob with headers or reverse proxy?
>=20
>=20
> On Thu, 2003-04-24 at 06:11, Germer, Carsten wrote:
> > Sorry for the late answer.
> > Yes, that works :) but I would need to do a lot of work by hand.
>=20
> If you're using standard_html_headers, this job might be made
> considerably shorter by adding these headers to your existing header
> object(s).
>=20
> >=20
> > I understand that "Accellerated HTTP Cache Manager" doesn't=20
> do the trick?
> > Why is it in the distribution then, anyway?
>=20
> I don't use AHCM, but I'm pretty sure this is exactly what it does.
>=20
> Dylan
>=20