Hey 🙂
Thanks for creating this plugin, been looking/hoping for something like this for ages.
Installed and set it up with only the most basic caching rules found in the NGINX Wiki and seems to work fine already with my WPMU (Multisite) 3.0.1 install.
And even without the ngx_cache_purge module it seems to purge updated content (not for the main page, i.e. the main page shows last 5 posts, last post gets updated, main page shows post still as was before update) just fine so i wonder if that requirement has been changed?
Anyways, looking forward to your response & keep up the good work 🙂
Are you sure that nginx is caching your pages?
Anyhow, this plugin will only function if you have the ngx_cache_purge module installed and with a
location ~ /purge(/.*) {
proxy_cache_purge staticfilecache "$scheme://$host$1";
}
or similar directive in your configuration as all the plugin really does is add a /purge/ after your domain so that example.com/page/ turns into example.com/purge/page/ and that page is called.
From a few loadtests using ab from another server i’m pretty sure nginx does indeed cache my sites & pages – of course i’ve configured the vhost with (nginx) caching enabled, sorry for omitting this info from my initial post. To add, i’m running nginx 0.7.67-3 from Debian Squeeze.
Regarding your blog-post about compiling nginx from source and adding the module i/you might want to add to maybe only allow access to the /purge location to localhost and deny all others – i for one don’t want everyone and his dog to be able to purge my cache 😉
Hi jlevandowski
The plugin works great.
with the introduction and wider use of Custom Post Types, it would be useful to be able to identify other pages to purge the cache. Two obvious places that come to mind are 1) CPT archive pages / CPT pages and 2) Parent pages.
Perhaps even a generic way to trigger other pages to be have their cache purged on publish/update.
Does that make sense?