[PATCH] Upstream: add $upstream_cache_age variable
Maxim Dounin
mdounin at mdounin.ru
Mon Oct 6 11:26:03 UTC 2014
Hello!
On Mon, Oct 06, 2014 at 02:10:18PM +0400, Roman Arutyunyan wrote:
[...]
> Another issue i’ve found reading the RFC.
>
> If the reason for $upstream_cache_age is adding HTTP Age response header then it makes
> sense to improve age calculation algorithm.
>
> According to RFC 7234 / 4.2.3. "Calculating Age” the local cache age should be added
> to the Age value received from backend (“age_value").
>
> response_delay = response_time - request_time;
> corrected_age_value = age_value + response_delay;
I agree, I don't think that the "date" value as stored in the
cache can/should be used for Age header. And I doubt it should be
exposed as a variable at all, even if calculated properly.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list