roles/nginx: Adjust fastcgi_cache_valid

Only cache 200, 301, and 302 requests!

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-03-09 10:23:07 +03:00
parent 066bf6fa85
commit 53d2c85bf0

View File

@ -61,7 +61,8 @@ server {
include fastcgi_params; include fastcgi_params;
fastcgi_cache global; fastcgi_cache global;
fastcgi_cache_valid any 1h; # HTTP responses to cache (default 200, 301, 302)
fastcgi_cache_valid 1h;
# Allow use of stale entries if the cache is updating # Allow use of stale entries if the cache is updating
fastcgi_cache_use_stale updating; fastcgi_cache_use_stale updating;
# Set X-Fastcgi-Cache header to "HIT", "MISS", "BYPASS", etc # Set X-Fastcgi-Cache header to "HIT", "MISS", "BYPASS", etc