Let's suppose you have this fastcgi_cache config:
fastcgi_cache_path /var/run/nginx-cache levels=2:2 keys_zone=WORDPRESS:2048m inactive=120m;
By using this module, in order to purge a single cached uri you can use a query like:
curl localhost/invalid_cache/mydomain.com/my_uri
I'd recommend allowing access to this path for invalidating the cache, only from localhost:
location /invalid_cache {
allow 127.0.0.1;
deny all;
set $prefix '/invalid_cache/';
perl purge_cache::handler;
}
In order to make use of this module, you should put it in your modules path and require it:
perl_modules /etc/nginx/perl/lib;
perl_require purge_cache.pm;