Graham Leggett wrote:
Bill Stoddard wrote:
Stale objects are discarded and fetched from the origin server.
So we're missing all the code to handle RFC 2616 section 13.3. We're not violating the RFC but our cache is sure not as efficient as possible.
What the CACHE_CONDITIONAL filter did was say "if the cached response is stale, change this request to a conditional request by adding If-None-Match. If I get a 304 back, then serve my cached copy, it is fresh. If I get a 200 back (or something else), throw away my cached copy and serve the new 200 content instead".
If the CACHE_CONDITIONAL filter is the wrong way to go about this, what is the correct way to go about this?
So far simplifying the code is nice, but if "simplifying" means "ignore part of the RFC", then we're moving backwards. :(
Regards, Graham --
Yea, I agree we lost some good function in the CACHE_CONDITIONAL filter. Here is Justin's explanation:
" Also, remove the broken conditional filter code as you can't reliably alter the filter list once the response is started. (Regardless, cache_select_url() has the freshness checks now.)"
Looking at adding the function back in.
Bill