=== Plugin Name === Contributors: hpatoio, rukbat Tags: cache, nginx, purge, performance Requires at least: 3.0 Tested up to: 3.0.3 Stable tag: trunk Easily purge Nginx cache. Each time a post is modified clear the cached version of the page and of all the related page. == Description == Each time an element of your blog is modified (post, page, media, custom post) its cached version, and of all the related elements (categories, archives and custom taxonomies) are deleted. In this way your cache has always the latest version of the page. Extra : - Two extra HTTP header are added to the response so that you can see if the page you are viewing is cached and when it was cached. - A logging system allow you to see which page were cached and when. - You can add personal URLs to be purged when the post is modified - Purge of future posts is handled with an external script. - Integration with NEXTGen Gallery. Credits : - This plugin is based on the structure of famous plugin "NEXTGen Gallery" == Installation == *IMPORTANT* If you are using a proxy you must modify the file class-http.php and delete lines 1624 and 1625. if ( $check['host'] == 'localhost' || $check['host'] == $home['host'] ) return false; ------- 1. Upload the directory `nginx-manager` to the `/wp-content/plugins/` directory 2. Configure Nginx. Install Cache Purge module http://labs.frickle.com/nginx_ngx_cache_purge/ and configure the cache 3. Activate the plugin through the 'Plugins' menu in WordPress For questions or support post a comment here http://www.iliveinperego.com/2010/10/nginx-automatically-cache-purge/ = Scheduled posts script = To avoid problems with scheduled posts you must set a cron job that i 1. Edit /script/future_posts_cron.php and set $_SERVER['HTTP_HOST'] to you host and ABSPATH_SCRIPT to your Wordpress installation path 2. Add a job in your crontab to schedule the script to run every minute For example : ` * * * * * /usr/local/bin/php /var/documentroot/wp-content/plugins/nginx-manager/script/future_posts_cron.php` == Screenshots == 1. Overview 2. Configuration page 3. Log == Changelog == = 1.2 (2010 12 28) = * NEW : You can now purge custom post types and tag archives * NEW : When you purge a post also all related custom taxonomies are purged (if enabled in the options) * NEW : Add constant in Overview / Debug * NEW : Versioning manager * EDIT : All other plugin class/functions moved in /integration folder * EDIT : Network activation only (if multisite) * EDIT : start_plugin() is now hooked with 'init' (priority 15) * EDIT : Purge by options now get URL via wp functions and not by urls saved in options * BUG : Purge comment via admin panel fixed * BUG : Fixed NGG purge functions * BUG : Fixed incorrect image URL retrieving in purgeOnMediaEdit() (thx Jean-Paul Horn) * BUG : Fixed few small bugs and typos = 1.1.1 (2010 12 15) = * BUG : Fixed options for single site installation (thx Jean-Paul Horn) = 1.1 (2010 11 10) = * BUG : Fixed options to manage different blogs data in a multisite installation * NEW : You can now purge personal URLs * NEW : Maximum size of log file is controlled by a scheduled event every day * NEW : Added a script to purge in case of future post and force a remote get. This script must be included in an external cron. * NEW : Added functionality to purge a thumb when it's edited in Manage Gallery of Nextgen Gallery plugin. (You need to add 'do_action('ngg_ajax_UpdateThumb', $picture->thumbURL);' in createNewThumb function in nextgen-gallery/admin/ajax.php after this line 'if ( $thumb->save($picture->thumbPath, 100)) {', about line 128) * BUG : Fixed few small bugs and typos = 1.0 (2010 10 14) = * Switching to first major release after 10 days of testing on a production environment. = 0.3 (2010 10 04) = * BUG : Fixed few small bugs and typos * NEW : When you purge a post also all related media are purged (if enabled in the options) * NEW : You can now truncate the log * Updated documentation = 0.2 (2010 10 01) = * BUG : Fixed few small bugs and typos