fastcgi_cache_bypass and 502 Bad Gateway

kaspars nginx-forum at
Sun Feb 13 17:18:14 MSK 2011

[quote]fastcgi_no_cache $http_cache_bypass; # do no cache at all
fastcgi_cache_bypass $http_cache_bypass; # bypass cache <--- Not sure
how you get the user's browser to send this header[/quote]

On each page I would have an AJAX call to a very small PHP script that
checks for the cache version number and makes a GET (or HEAD) request
with Cache-Bypass header if the page needs to be regenerated.

The idea is similar to the one described here:

But instead of using a version number for cache key (set by a cookie), I
would use it for cache invalidation.

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

More information about the nginx mailing list