Welcome! Log In Create A New Profile

Advanced

Re: Response Header IF statement problem

Francis Daly
February 16, 2018 10:40AM
On Fri, Feb 16, 2018 at 01:49:59PM +0000, Friscia, Michael wrote:

Hi there,

> Thank you, this was incredibly useful and helped me think this through in Nginx terms and I have everything working now. Thank you again!

You're welcome.

Good to hear that you have things working the way you want them to.

> Minor side question, is there a variable I can use to post to a debug header to indicate if a page was newly written to the cache versus a page that was read from cache? If I had this information, then from a tier2/3 support side it could speed up debugging.

Possibly $upstream_cache_status?

http://nginx.org/r/$upstream_cache_status, or a section in
https://www.nginx.com/blog/nginx-caching-guide/ for more information.

If the seven states of that variable reveals more information than
you want to, you could use a map to turn three values into "it came from
upstream", and four into "it came from cache", and just send that binary
value in the debug header.

Note that that variable is not exactly what you asked for; it might be
close enough for what you want.

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Response Header IF statement problem

wickedhangover February 14, 2018 09:12AM

Re: Response Header IF statement problem

Roman Arutyunyan February 14, 2018 10:02AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:04AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:08AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:04PM

Re: Response Header IF statement problem

webopsx February 14, 2018 04:39PM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 04:46PM

Re: Response Header IF statement problem

pbooth February 14, 2018 05:16PM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:04AM

Re: Response Header IF statement problem

wickedhangover February 15, 2018 08:24AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 07:38AM

Re: Response Header IF statement problem

wickedhangover February 16, 2018 08:52AM

Re: Response Header IF statement problem

Francis Daly February 16, 2018 10:40AM

Re: Response Header IF statement problem

webopsx February 14, 2018 10:03AM

Re: Response Header IF statement problem

wickedhangover February 14, 2018 10:18AM

Re: Response Header IF statement problem

webopsx February 14, 2018 05:07PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
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