Skip to content

Commit a15afb5

Browse files
committed
Fix caching for pages not found (404 & 410)
This fixes https://support.flownative.com/#ticket/zoom/6585 which is caused by the behaviour described in https://trac.nginx.org/nginx/ticket/1233 which I assume affects the fastcgi cache in the same way. So this makes 404 and 410 responses cached for 30 seconds, to have such pages invalidated relatively quick, but also caching them for a bit longer, as it would usually be fine…
1 parent a8755e9 commit a15afb5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

root-files/opt/flownative/lib/nginx.sh

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ nginx_config_fastcgi_cache() {
6060
fastcgi_cache_methods GET HEAD;
6161
fastcgi_cache_key \$request_method\$scheme\$host\$request_uri;
6262
fastcgi_cache_valid 200 301 302 ${NGINX_CACHE_DEFAULT_LIFETIME};
63+
fastcgi_cache_valid 404 410 30s;
6364
fastcgi_cache_use_stale ${NGINX_CACHE_USE_STALE_OPTIONS};
6465
fastcgi_cache_background_update ${NGINX_CACHE_BACKGROUND_UPDATE};
6566

0 commit comments

Comments
 (0)