Exemplos de Uso
$
fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=FASTCGICACHE:10m max_size=1g inactive=60m;
$
set $skip_cache 0;
if ($request_method = POST) { set $skip_cache 1; }
if ($query_string != "") { set $skip_cache 1; }
$
location ~ \.php$ {
fastcgi_cache FASTCGICACHE;
fastcgi_cache_valid 200 1m;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
add_header X-FastCGI-Cache $upstream_cache_status;
}
$
nginx -t && nginx -s reload