Having problems getting Accelerated HTTP Cache Manager to work
Hi, I'm using Zope 2.3.2 with Apache and Rewrite Rules. I set up caching using mod_proxy with the following settings: CacheRoot "/var/cache/httpd" CacheSize 10240 CacheGcInterval 1 CacheMaxExpire 24 CacheLastModifiedFactor 0.1 CacheDefaultExpire 1 I then added the following to standard_html_header: <dtml-call "RESPONSE.setHeader('Expires', _.DateTime(_.DateTime().timeTime() + 3600).toZone('GMT').rfc822())"> <dtml-call "RESPONSE.setHeader('Last-Modified', bobobase_modification_time().toZone('GMT').rfc822())"> This works fine and everything gets cached. Then I removed the above calls and instead installed an Accelerated HTTP Cache Manager (and associated all my DTML Methods with it). This time no caching took place. I then unncommented the line that sets the Last-Modified header (line 175 in AcceleratedHTTPCacheManager.py). This time caching worked. Several posts on this list indicated that Last-Modified is not required for caching. If that's true, why can't I get caching to work without touching the source? Am I missing anything in my settings or in using the Cache Manager? TIA, Itai -- -- Itai Tavor -- "Je sautille, donc je suis." -- itai@optusnet.com.au -- - Kermit the Frog -- -- -- -- "If you haven't got your health, you haven't got anything" --
Itai Tavor writes:
Several posts on this list indicated that Last-Modified is not required for caching. If that's true, why can't I get caching to work without touching the source? Am I missing anything in my settings or in using the Cache Manager? The HTTP 1.1 caching specification says that either a "Last-Modified" or a "Content-Id" (the header name is probably wrong!) must be present for caching to happen. Maybe, you have a look at this spec.
Dieter
Dieter Maurer writes:
Itai Tavor writes:
Several posts on this list indicated that Last-Modified is not required for caching. If that's true, why can't I get caching to work without touching the source? Am I missing anything in my settings or in using the Cache Manager? The HTTP 1.1 caching specification says that either a "Last-Modified" or a "Content-Id" (the header name is probably wrong!) must be present for caching to happen. Maybe, you have a look at this spec.
Thanks, Dieter, but I don't think an understanding of the HTTP protocol caching specifications should have any effect on getting Zope's cache managers to work. The Accelerated HTTP Cache Manager is supposed to take care of the headers for you, isn't it? So a Cache Manager plus correctly configured caching front-end should be all you need. But this turns out to be wrong, unless I uncomment a line in the Cache Manager. This doesn't make sense to me. And I can still see nothing in what I'm doing that could cause this. Itai -- -- Itai Tavor -- "Je sautille, donc je suis." -- itai@optusnet.com.au -- - Kermit the Frog -- -- -- -- "If you haven't got your health, you haven't got anything" --
Itai Tavor writes:
Thanks, Dieter, but I don't think an understanding of the HTTP protocol caching specifications should have any effect on getting Zope's cache managers to work. The Accelerated HTTP Cache Manager is supposed to take care of the headers for you, isn't it? So a Cache Manager plus correctly configured caching front-end should be all you need. But this turns out to be wrong, unless I uncomment a line in the Cache Manager. Maybe a bug -- to be reported to the Collector.
The caching specifications might help you to verify it is a bug, to work around/fix the bug, to understand why your change helps. Dieter
participants (2)
-
Dieter Maurer -
Itai Tavor