# RunCache: NGINX FastCGI cache directives. # Include this file INSIDE your existing PHP location block. # Bugs or questions? Email support@runcloud.io. # This file contains PHP-location directives only. Keep generated config # files outside public URL routing or deny them at server level. set $runcache_fastcgi_disabled 1; if (-f $document_root/wp-content/cache/runcache/.enabled-fastcgi-${host}) { set $runcache_fastcgi_disabled 0; } fastcgi_cache {{CACHE_ZONE}}; fastcgi_cache_valid 200 8h; fastcgi_no_cache $runcache_fastcgi_disabled; fastcgi_cache_bypass $runcache_fastcgi_disabled; fastcgi_no_cache $upstream_http_x_runcache_bypass; fastcgi_cache_bypass $upstream_http_x_runcache_bypass; fastcgi_no_cache ${{SITE_CACHE_VAR}}_logged_in; fastcgi_cache_bypass ${{SITE_CACHE_VAR}}_logged_in; fastcgi_no_cache ${{SITE_CACHE_VAR}}_no_cache_method; fastcgi_cache_bypass ${{SITE_CACHE_VAR}}_no_cache_method; fastcgi_no_cache ${{SITE_CACHE_VAR}}_no_cache_uri; fastcgi_cache_bypass ${{SITE_CACHE_VAR}}_no_cache_uri; fastcgi_no_cache ${{SITE_CACHE_VAR}}_no_cache_agent; fastcgi_cache_bypass ${{SITE_CACHE_VAR}}_no_cache_agent; fastcgi_no_cache ${{SITE_CACHE_VAR}}_no_cache_ip; fastcgi_cache_bypass ${{SITE_CACHE_VAR}}_no_cache_ip; add_header x-runcache-type $runcache_fastcgi_type_header; add_header x-runcache-status $runcache_fastcgi_status_header;