Open rija opened 6 years ago
I just tried fastcgi_cache_purge
but couldn't get it working. Is this working for anyone else?
I did manage to get it running, but the URL based invalidation wasn't reliable (it seems sometimes/often the cache won't be invalidated even if the url is correct) and the two related supporting wp plugins (one is Nginx Helper) didn't work well for me.
Unless I find out what's the problem or what I did wrong, I may abandon that approach on this project.
Redis and APCu are two approaches that I find more promising.
For security reasons, php-fpm and nginx run under different users so Nginx-Cache and Nginx-Helper plugins cannot delete the cache on the filesystem. This is not desirable anyway because it creates an attack opportunity on the filesystems form Wordpress.
A better approach is to use a location-based approach, something like:
nginx is already compile with ngx_cache_purge.
Only Nginx-Helper supports this in theory but last time I tried it wasn't reliable.