We use VPS with Debian, Nginx 1.24 + PHP-FPM 8.3 with active Fastcgi cache. Everything works ok, but if we want to purge cache from Wordpress, it removes only cache file, not folders. We use Nginx Helper in Wordpress . With previous (and unsupported) plugin Nginx Cache we dont have problem - remove cache with folders.
The plugin requires ngx_cache_purge module, but is not supported in the version 1.24, but purging the cache works.It is possible that version 1.24 already has a similar function integrated.
Has anyone encountered with this problem?
Vhost conf file:
fastcgi_cache_path /var/cache/nginx-cache/brainya levels=1:2 keys_zone=brainya:50m inactive=10m;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
include snippets/fastcgi-php.conf;
fastcgi_cache brainya;
fastcgi_cache_valid 200 301 302 2h;
fastcgi_cache_use_stale error timeout updating invalid_header http_500 http_503;
fastcgi_cache_min_uses 1;
fastcgi_cache_lock on;
fastcgi_cache_bypass $no_cache;
fastcgi_no_cache $no_cache;
add_header X-FastCGI-Cache $upstream_cache_status;
We tried Nginx version 1.22, change fastcgi setting, rights to folders and files
1:2, so at a maximum you’ll have 4,096 folders (16 root folders, and in each 256 sub folders). (This also assumes my math is correct this early in the morning.) I understand that before it was clearing these out, and isn’t now, but is there a reason you want them gone? They will keep coming back, and shouldn’t be hurting you in any way. I don’t have a fix for you, either, unfortunately, but I also think there might not be anything to fix really.