Welcome! Log In Create A New Profile

Advanced

Re: Using an upstream header value as a proxy_cache_key

Troy Hakala
December 24, 2009 06:54PM
Duh! That makes sense. :-) Thanks.


On Dec 24, 2009, at 3:34 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Thu, Dec 24, 2009 at 03:28:25PM -0800, Troy Hakala wrote:
>
>> Is it possible to have an upstream server set an HTTP header
>> that can be used as the key in proxy_cache_key? This doesn't
>> work:
>>
>> proxy_cache_key $upstream_http_x_myheader;
>>
>> And neither does this:
>>
>> set $v $upstream_http_x_myheader;
>> proxy_cache_key $v;
>
> It won't, as $upstream_* variables are available only after
> request to upstream while cache key must be constructable from
> client request (before request to upstream, to find out if it's
> needed).
>
> Maxim Dounin
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx

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

Using an upstream header value as a proxy_cache_key

Troy Hakala December 24, 2009 06:36PM

Re: Using an upstream header value as a proxy_cache_key

Maxim Dounin December 24, 2009 06:38PM

Re: Using an upstream header value as a proxy_cache_key

Troy Hakala December 24, 2009 06:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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