method 1 risky emergency mode
delete fast cgi cache
fast cg ache directory /var/www/html/fastcgicache
sudo rm -r /var/www/html/fastcgicache/*
worked to fine to purge updated psge in wordpress (works for proxy cache also)
nginx helper plugin not working
How to Purge CLear Fastcgi Cache?
1.Add this Code your nginx /conf.d/ default.conf
location ~ /purge(/.*) {
fastcgi_cache_purge WORDPRESS “$scheme$request_method$host$1”;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_pass unix:/var/run/php/sarkari.sock;
fastcgi_keep_conn on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 8 32k;
fastcgi_buffer_size 32k;
http2_push_preload on;
fastcgi_cache_bypass $skip_cache;
fastcgi_no_cache $skip_cache;
fastcgi_cache FASTCGICACHE;
fastcgi_cache_valid 15m;
fastcgi_cache_min_uses 2;
fastcgi_max_temp_file_size 0;
add_header X-Cache $upstream_cache_status;
#fastcgi_pass_request_headers on;
#add_header Cache-Control “max-age=0, s-maxage=2000, must-revalidate”;
#etag on;
#add_header ‘Last-Modified’ $upstream_http_last_modified;
#access_log /var/log/nginx/phpfpmonly-access.log;
}
location ~ /purge(/.*) {
fastcgi_cache_purge FASTCGICACHE “$scheme$request_method$host$1”;
}
2. Enter server ip/purge to clear the cache
or
nginx helper plugin
requires above code automatically purges the content.
install this to purge content automatically when wp pages updated.
in Some cases Fastcgi Caches won’t delete.
Then Delete Fastcgi Cache Directory, or Assign new location reload nginx.