AJAX Cache Purge Cookie Plugin
This plugin sets a “version” cookie of your site’s content, which can be used for time-based cache invalidation, as the cookie is checked and updated (if necessary) on each page request through a single AJAX request.
Download: ajax-cache-purge.zip (June 26, 2010)
Installation
Please note that this plugin is intended for people who run their own servers.
- Upload and enable the plugin.
- Add the value of
wp_cache_key_cookieto the cache key.
Nginx Example
fastcgi_cache_path /var/www/cache levels=1:2
keys_zone=wp-cache:10m
inactive=2m max_size=2000m;
fastcgi_temp_path /var/www/cache/tmp;
server {
# other config options
location ~ \.php$ {
# wp_cache_key_cookie is supplied by the plugin
set $wp_cache_key $scheme$host$request_uri|$cookie_wp_cache_key_cookie;
#add key in header for debugging
#add_header WP_KEY $wp_cache_key;
fastcgi_cache wp-cache;
fastcgi_cache_key $wp_cache_key;
}
}