Welcome! Log In Create A New Profile

Advanced

Conditional Proxy Caching in Location

Igal Sapir
September 13, 2020 06:44PM
Hello,

I have a variable that shows if a certain cookie exists in the Request,
e.g. $req_has_somecookie, and I want to be able to use proxy_cache only for
specific URIs, e.g. /slow-page/ if the variable is 0.

I know that "if" is evil as it creates a new location scope.

What's the best way to handle this?

Thanks,

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

Conditional Proxy Caching in Location

Igal Sapir September 13, 2020 06:44PM

Re: Conditional Proxy Caching in Location

Francis Daly September 14, 2020 08:24AM

RE: Conditional Proxy Caching in Location

Igal Sapir September 17, 2020 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready