Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz
November 14, 2013 12:46PM
On 11/14/2013 06:14 PM, Maxim Dounin wrote:
> Hello!
>
Thanks for your quick review.

I’ll provide a (actually two) revised patch later, meanwhile here are a
few comments and questions.

>
> As used in the patch, it looks like there is no need for a special
> process function for the Age header.
>

Indeed, but this is used in my subsequent patch. I will remove that from
the first patches.

> Processing Cache-Control header in
> ngx_http_upstream_send_response() is at least sub-optimal, and may
> cause unneeded work if caching is disabled with, e.g.,
> "Cache-Control: no-cache".
>
> At most, this should be done in ngx_http_upstream_process_headers(),
> but even this will be too late for upcoming cache revalidation
> with conditional requests.
>
> [...]

Where would you then process these values, if not after every headers
have been processed? At the moment, nginx processes them one by one, in
the order there are found in upstream’s response. Do you suggest that in
process_cache_control I add some "if 'expires' has already been
processed" condition, and something equivalent in
'process_cache_control'? That doesn’t look ideal to me, hence why I
chose to set the valid_sec value once every header has been processed.

Do you have any suggestion?

Thank you

--
Florent Le Coz
Smartjog

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 791 November 14, 2013 10:36AM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 321 November 14, 2013 12:16PM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 330 November 14, 2013 12:46PM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 320 November 15, 2013 07:46AM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 393 November 15, 2013 10:36AM

Re: [PATCH] Upstream: fix the cache duration calculation

Maxim Dounin 328 November 15, 2013 11:46AM

Re: [PATCH] Upstream: fix the cache duration calculation

Florent Le Coz 353 November 15, 2013 11:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready