proxy_cache_bypass and proxy_no_cache

António P. P. Almeida appa at perusio.net
Mon Dec 10 08:32:03 UTC 2012


You can use at the http level:

map $cookie_no_cache $dont_cache {
    0 1;
    1 0;
}

Then use the $dont_cache variable instead.

--appa

amodpandey <nginx-forum at nginx.us> a écrit :

>I want to proxy_cache responses only with a specific cookie in request.
>
>I thought to use
>
>proxy_cache_bypass    ! $cookie_cache;
>proxy_no_cache            ! $cookie_cache;
>
>That ( ! ) does not work. 
>
>One more question, why we need to have proxy_cache_bypass and proxy_no_cache
>else
>nginx: [warn] "proxy_no_cache" functionality has been changed in 0.8.46, now
>it should be used together with "proxy_cache_bypass"
>
>Help Please!
>
>Regards
>Amod
>
>Posted at Nginx Forum: http://forum.nginx.org/read.php?2,233778,233778#msg-233778
>
>_______________________________________________
>nginx mailing list
>nginx at nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx


More information about the nginx mailing list