Welcome! Log In Create A New Profile

Advanced

Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

Jeroen Ooms
January 24, 2014 03:48PM
I use nginx to cache both GET and POST requests. I want to use
proxy_cache_bypass to allow users to bypass the cache, but ONLY for
GET requests. POST requests should always be cached. I tried this:

map $request_method $is_get {
default: "";
GET "true";
}
proxy_cache_methods POST;
proxy_cache_bypass $http_cache_control $is_get;


However, this bypasses the cache when either $http_cache_control OR
$is_get is set. How can I achieve to set proxy_cache_bypass when both
http_cache_control AND $is_get are set?

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

Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

Jeroen Ooms January 24, 2014 03:48PM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

B.R. January 24, 2014 04:06PM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

Jeroen Ooms January 24, 2014 09:42PM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

B.R. January 24, 2014 10:06PM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

Jonathan Kolb January 25, 2014 08:26AM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

Jeroen Ooms January 25, 2014 10:28PM

Re: Using 2 intersection of conditions for proxy_cache_bypass (avoiding logical if/and)

António P. P. Almeida January 24, 2014 09:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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