Welcome! Log In Create A New Profile

Advanced

Re: How to determine when the response from the cache

May 12, 2012 09:56AM
Chris, thank you, this is what i need.

By the way, i found one strange thing - operator "if" don't work with $upstream_cache_status.
For example, i try to change "HIT" and "MISS" to more enigmatic values

set $tocache X;
if ($upstream_cache_status = HIT)
{
set $tocache H;
}

if ($upstream_cache_status = MISS)
{
set $tocache M;
}

add_header tocache "$tocache ($upstream_cache_status)";

I expected to see "tocache: M (MISS)" and "tocache: H (HIT)".
But i got "tocache: X (MISS)" and "tocache: X (HIT)".

Maybe "if" works not for any variable?
Subject Author Posted

How to determine when the response from the cache

xore May 12, 2012 07:03AM

Re: How to determine when the response from the cache

hexa May 12, 2012 07:20AM

Re: How to determine when the response from the cache

xore May 12, 2012 09:56AM

Re: How to determine when the response from the cache

xore May 14, 2012 03:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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