Changeset 1191882
- Timestamp:
- 07/03/2015 03:18:48 PM (11 years ago)
- Location:
- nginx-helper/trunk
- Files:
-
- 3 edited
-
nginx-helper.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
redis-purger.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
nginx-helper/trunk/nginx-helper.php
r1191338 r1191882 4 4 Plugin URI: https://rtcamp.com/nginx-helper/ 5 5 Description: Cleans nginx's fastcgi/proxy cache whenever a post is edited/published. Also does few more things. 6 Version: 1.9. 16 Version: 1.9.2 7 7 Author: rtCamp 8 8 Author URI: https://rtcamp.com … … 50 50 add_action( 'add_init', array( &$this, 'update_map' ) ); 51 51 52 add_action( 'save_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 );52 //add_action( 'save_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 ); 53 53 // add_action( 'publish_post', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 ); 54 54 // add_action( 'publish_page', array( &$rt_wp_nginx_purger, 'purgePost' ), 200, 1 ); … … 127 127 128 128 global $blog_id, $rt_wp_nginx_purger; 129 if ( !$this->options['enable_purge'] ) { 130 return; 131 } 132 if ( $old_status != $new_status && $old_status != 'inherit' && $new_status != 'inherit' && $old_status != 'auto-draft' && $new_status != 'auto-draft' && $new_status != 'publish' && !wp_is_post_revision( $post->ID ) ) { 129 $skip_status = array( 'auto-draft', 'draft', 'inherit', 'trash', 'pending' ); 130 $purge_status = array( 'publish', 'future' ); 131 132 if ( !$this->options['enable_purge'] || in_array( $old_status, $skip_status ) ) { 133 return; 134 } 135 136 if( in_array( $old_status, $purge_status ) || in_array( $new_status, $purge_status ) ) { 133 137 $rt_wp_nginx_purger->log( "Purge post on transition post STATUS from " . $old_status . " to " . $new_status ); 134 138 $rt_wp_nginx_purger->purgePost( $post->ID ); -
nginx-helper/trunk/readme.txt
r1191338 r1191882 1 1 === Nginx Helper === 2 Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, Darren Slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer 2 Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, Darren Slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel 3 3 Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, rewrite, permalinks 4 4 Requires at least: 3.0 5 5 Tested up to: 4.2.2 6 Stable tag: 1.9. 16 Stable tag: 1.9.2 7 7 later (of-.1course) 8 8 Fix purging for custom post types … … 117 117 == Changelog == 118 118 119 = 1.9.2 = 120 Fix purging for Redis cache and FastCGI cache 121 119 122 = 1.9.1 = 120 123 Fix purging for custom post types -
nginx-helper/trunk/redis-purger.php
r1190839 r1191882 219 219 $host = $rt_wp_nginx_helper->options['redis_hostname']; 220 220 $prefix = $rt_wp_nginx_helper->options['redis_prefix']; 221 $_url_purge_base = $prefix . $parse['scheme'] . 'GET' . $ host. $parse['path'];221 $_url_purge_base = $prefix . $parse['scheme'] . 'GET' . $parse['host'] . $parse['path']; 222 222 delete_single_key( $_url_purge_base ); 223 223 }
Note: See TracChangeset
for help on using the changeset viewer.