fastcgi_cache_bypass and 502 Bad Gateway

Dayo nginx-forum at
Fri Feb 11 20:50:59 MSK 2011

kaspars Wrote:
> My understanding is that
> if "fastcgi_cache_bypass 1", then Nginx will
> request a fresh response from the backend and
> cache that response for further use where
> "fastcgi_cache_bypass 0".
> Is that how fastcgi_cache_bypass should work?

No idea as it is not documented in the English docs and I can't read

Assuming it works like the proxy version though (and the English
documentation for that is really unclear as it seems to suggest to just
use the 'cache_bypass' version and forget about the 'no_cache' version),
then my understanding is: 

1. ?_no_cache = get from backend but cache response
2. ?_cache_bypass = do not cache response

So if you want to bypass the cache and also not cache that response,
then you should be using the two together.

Note though that as said, the English documentation does not state this
but again I think I have read Igor posting this somewhere.

Posted at Nginx Forum:,173795,174207#msg-174207

More information about the nginx mailing list