Graham Leggett wrote:
> Hi Brian,
> 
> You mentioned at Apachecon that one of the things you needed from the
> server (and built) was an offline module.
> 
> Thinking about it, in order to achieve the goal of a cache mimicking an
> origin server, is the following true:
> 
> - Cache-Control and Pragma headers must be stripped from requests into
> the cache.

Why?  Just because you are in offline mode doesn't mean other proxies
between you and the client (or the client itself) are.

> 
> - mod_cache must, if the backend response is 5xx, deliver the latest
> cached data the server has present, regardless of whether the cached
> entry is stale or not.

I worked on an offline implementation recently.  I only delivered the
cached response regardless of staleness (and, indeed, all other checks
beyond its existence), on a 502/504.  My logic was that those are the
only codes being generated by the "client" end of the server (eg,
mod_proxy), and anything else could be considered a fresh response.

I think I can get permission to send a patch of what we did so far, if
there's interest; it's crude and still not fully tested (and we haven't
merged in the recent mod_disk_cache changes), but it's simple and may be
a helpful starting point.

> 
> Is there anything else it would need to do?
> 
> Regards,
> Graham
> -- 

Reply via email to