Dieter Maurer wrote at 2004-11-20 10:08 +0100:
We use Apache for caching and observe the following behaviour:
Apache requests the object from Zope and caches it until the expiration date is reached. From then on, Apache forwards "If-Modified-Since" requests to Zope, Zope responds with an "304" response but without a new expiration date! As Apache does not get new expiration info, it continues to forward "If-Modified-Since" requests for the object. This significantly reduces cache efficiency.
In my view, Zope should include new expiration info in its "304" responses.
Meantime, I checked that the HTTP 1.1 spec requires that "Expires", "Cache-Control" and "Vary" should indeed be resent, if they are different from the original response (which is quite likely for automatically determined "Expires" headers).
The CachingManager API may need to be extended, to allow the HTTP CacheManager to add information to "304" responses.
HTTP 1.1 requires further that other headers (different from "Date", "Expires", "Cache-Control" and "Vary") are not resent in an 304 response (in order not to cause cache consistency problems). This is difficult to achieve with e.g. the "Caching Policy Manager" (which would add "max-age" as well). I think, however, that a violation of this rule will not cause serious problems. -- Dieter