Welcome! Log In Create A New Profile

Advanced

proxy_cache_valid for zero seconds

November 14, 2012 04:09PM
Greetings,

I am trying to configure nginx proxy_cache so that it stores a cached copy of a HTTP response, but serves from cache *only* under the conditions defined by proxy_cache_use_stale.

I have tried something like this without success:

proxy_cache_valid 200 204 301 302 0s;
proxy_cache_use_stale error timeout updating invalid_header http_500 http_502 http_504;

"0s" appears to avoid caching completely. "1s" stores a cached copy, but presumably serves from cache for one second. I am trying to serve from cache only when the upstream errs.

Thank you
SubjectAuthorPosted

proxy_cache_valid for zero seconds

shmaptyNovember 14, 2012 04:09PM

Re: proxy_cache_valid for zero seconds

shmaptyNovember 20, 2012 03:11PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 3 on November 23, 2014
Record Number of Guests: 377 on November 23, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready