[PATCH] HTTP: Add the $upstream_cache_age variable, allowing better HTTP/1.1 compliance

Damien Tournoud damien at platform.sh
Tue Jun 9 15:13:43 UTC 2015


On Tue, Jun 9, 2015 at 5:00 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Please see this (and the thread):
> http://mailman.nginx.org/pipermail/nginx-devel/2014-October/006030.html


Good point. So would it be acceptable to:

(1) add a new header processor for the "Age" header;
(2) update `r->cache->date` and `r->cache->valid_sec` at the two places
where it is set (miss + revalidation), to take into account the age of the
upstream object.

I'm not sure what `->date` is used for right now, so I don't know if it is
ok to change its semantics like this (from "date when the object was last
fetched / revalidated from upstream" to "date the object was created in the
upstream")... I assume it is for expiring cached entry, but I'm not clear
with that.

Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20150609/ea971410/attachment.html>


More information about the nginx-devel mailing list