proxy_cache_valid for zero seconds

shmapty nginx-forum at
Tue Nov 20 20:11:51 UTC 2012

Put another way -- can I store/cache all content from the proxied upstream
(up to the limits defined in proxy_cache_path), but serve from the cache
only when the proxied upstream fails (e.g. timeout, error)?

We have content that should be dynamic, and hence every request should be
transparently proxied.  However, I want to protect against the situation
when the upstream is down or having trouble.  Serving a stale response
(though normally undesirable), is better than returning an error.

Thank you

Posted at Nginx Forum:,232815,233027#msg-233027

More information about the nginx mailing list