Welcome! Log In Create A New Profile

Advanced

proxy_cache_valid depending on $host

Phil Endecott
January 25, 2021 11:28AM
Dear Experts,

I wanted to write this:

proxy_cache_valid 200 5m;
if ($host ~ foo) {
proxy_cache_valid 200 30d;
}

but proxy_cache_valid is not allowed in "if" blocks.
Is there some work-around to have different cache validity times
for different hosts, in a caching proxy?


Thanks, Phil.




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

proxy_cache_valid depending on $host

Phil Endecott January 25, 2021 11:28AM

Re: proxy_cache_valid depending on $host

Maxim Dounin January 25, 2021 11:40AM

Re: proxy_cache_valid depending on $host

Phil Endecott January 26, 2021 12:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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