Files
LEMPer/etc/nginx/includes/fastcgi_cache.conf
2019-09-24 15:19:04 +07:00

28 lines
767 B
Plaintext

## FastCGI cache.
# Designed to be included in any http, server, location block.
fastcgi_cache FASTCGICACHE;
fastcgi_cache_valid 200 301 302 60m;
fastcgi_cache_valid 404 1m;
fastcgi_cache_valid any 60m;
fastcgi_cache_min_uses 1;
fastcgi_cache_lock on;
fastcgi_cache_bypass $skip_cache $is_mobile;
fastcgi_cache_bypass $http_pragma $http_authorization;
fastcgi_no_cache $skip_cache $is_mobile;
fastcgi_no_cache $http_pragma $http_authorization;
fastcgi_cache_purge $purge_method;
# Ignore header
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
# Header status
add_header X-FastCGI-Cache $upstream_cache_status;
# Designed to be used with Nginx Cache Controller WP plugin
#fastcgi_pass_header "X-Accel-Redirect";
#fastcgi_pass_header "X-Accel-Expires";