[PATCH] Upstream: Cache stale responses if they may be revalidated.

Thorvaldur Thorvaldsson thorvaldur.thorvaldsson at gmail.com
Sat Dec 19 01:40:33 UTC 2015

Hello again,

I'd just like to make one final revision of the patch.

Two simplifications can be made without sacrificing my main objective,
i.e., to make it possible for nginx to cache responses from upstream
that must always be revalidated for authorization.

The simplifications are:

  1) Don't change the handling of the X-Accel-Expires or Expires
     headers, i.e., change only the handling of max-age=0 (and
     s-maxage=0) in Cache-Control.

  2) Don't lower the valid time of all cached responses by one second,
     i.e., just make sure that a cached response is "immediately stale"
     when max-age=0.

I've attached the test cases. It's a new file this time and not a patch
like the one I posted on another thread.

I'll post the new and simplified changeset patch in a moment.

Best regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy_cache_revalidate_always.t
Type: application/x-troff
Size: 4207 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20151219/67649f9e/attachment.t>

More information about the nginx-devel mailing list