httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <>
Subject Re: [PATCH]: mod_cache: don't store headers that will never be used
Date Sun, 29 Jul 2007 18:34:59 GMT
Niklas Edmundsson wrote:

> The solution is to NOT rewrite the on-disk headers when the following 
> conditions are true:
> - The body is NOT stale (ie. HTTP_NOT_MODIFIED when revalidating)
> - The on-disk header hasn't expired.
> - The request has max-age=0
> This is perfectly OK with RFC2616 10.3.5 and does NOT break anything.

 From 10.3.5: "If a cache uses a received 304 response to update a cache 
entry, the cache MUST update the entry to reflect any new field values 
given in the response." This sinks this, unless I am misunderstanding 

I suspect there is a more robust way of solving this:

In order to determine whether the entity was cached in the first place, 
the cache would have had to read the headers in from disk.

Fast forward to after the 304 response was received, we have the headers 
  as received from the backend.

Compare these two sets of headers, and if they are equal, there is no 
need to rewrite them to disk.


View raw message