Nginx Helper - Version 1.9.6

Version Description

  • Fixed cache purging on post publish.
  • Error fixed when redis server not installed.
Download this release

Release Info

Developer rtcamp
Plugin Icon 128x128 Nginx Helper
Version 1.9.6
Comparing to
See all releases

Code changes from version 1.9.5 to 1.9.6

Files changed (3) hide show
  1. includes/redis-delete.php +10 -2
  2. nginx-helper.php +3 -4
  3. readme.txt +9 -4
includes/redis-delete.php CHANGED
@@ -14,7 +14,11 @@ if ( class_exists( 'Redis' ) ) { // Use PHP5-Redis if installed.
14
  $myredis = new Redis();
15
  $myredis->connect( $host, $port, 5 );
16
  $redis_api = 'php-redis';
17
- } catch ( Exception $e ) { $rt_wp_nginx_purger->log( $e->getMessage(), 'ERROR' ); }
 
 
 
 
18
  } else {
19
  if( ! class_exists( 'Predis\Autoloader' ) ) {
20
  require_once 'predis.php';
@@ -30,7 +34,11 @@ if ( class_exists( 'Redis' ) ) { // Use PHP5-Redis if installed.
30
  try {
31
  $myredis->connect();
32
  $redis_api = 'predis';
33
- } catch ( Exception $e ) { $rt_wp_nginx_purger->log( $e->getMessage(), 'ERROR' ); }
 
 
 
 
34
  }
35
 
36
  //Lua Script
14
  $myredis = new Redis();
15
  $myredis->connect( $host, $port, 5 );
16
  $redis_api = 'php-redis';
17
+ } catch ( Exception $e ) {
18
+ if( isset($rt_wp_nginx_purger) && !empty($rt_wp_nginx_purger) ) {
19
+ $rt_wp_nginx_purger->log( $e->getMessage(), 'ERROR' );
20
+ }
21
+ }
22
  } else {
23
  if( ! class_exists( 'Predis\Autoloader' ) ) {
24
  require_once 'predis.php';
34
  try {
35
  $myredis->connect();
36
  $redis_api = 'predis';
37
+ } catch ( Exception $e ) {
38
+ if( isset($rt_wp_nginx_purger) && !empty($rt_wp_nginx_purger) ) {
39
+ $rt_wp_nginx_purger->log( $e->getMessage(), 'ERROR' );
40
+ }
41
+ }
42
  }
43
 
44
  //Lua Script
nginx-helper.php CHANGED
@@ -3,12 +3,12 @@
3
  Plugin Name: Nginx Helper
4
  Plugin URI: https://rtcamp.com/nginx-helper/
5
  Description: Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does few more things.
6
- Version: 1.9.5
7
  Author: rtCamp
8
  Author URI: https://rtcamp.com
9
  Text Domain: nginx-helper
10
  Requires at least: 3.0
11
- Tested up to: 4.2.3
12
  */
13
 
14
  namespace rtCamp\WP\Nginx {
@@ -126,10 +126,9 @@ namespace rtCamp\WP\Nginx {
126
  {
127
 
128
  global $blog_id, $rt_wp_nginx_purger;
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
 
3
  Plugin Name: Nginx Helper
4
  Plugin URI: https://rtcamp.com/nginx-helper/
5
  Description: Cleans nginx's fastcgi/proxy cache or redis-cache whenever a post is edited/published. Also does few more things.
6
+ Version: 1.9.6
7
  Author: rtCamp
8
  Author URI: https://rtcamp.com
9
  Text Domain: nginx-helper
10
  Requires at least: 3.0
11
+ Tested up to: 4.3
12
  */
13
 
14
  namespace rtCamp\WP\Nginx {
126
  {
127
 
128
  global $blog_id, $rt_wp_nginx_purger;
 
129
  $purge_status = array( 'publish', 'future' );
130
 
131
+ if ( !$this->options['enable_purge'] ) {
132
  return;
133
  }
134
 
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, redis, redis-cache, rewrite, permalinks
4
  Requires at least: 3.0
5
- Tested up to: 4.2.3
6
- Stable tag: 1.9.5
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
@@ -114,6 +114,10 @@ Please post your problem in [our free support forum](http://community.rtcamp.com
114
 
115
  == Changelog ==
116
 
 
 
 
 
117
  = 1.9.5 =
118
  Added custom purge URL option.
119
 
@@ -318,5 +322,6 @@ Fix url escaping [#82](https://github.com/rtCamp/nginx-helper/pull/82) - by
318
 
319
  == Upgrade Notice ==
320
 
321
- = 1.9.5 =
322
- Added custom purge URL option.
 
2
  Contributors: rtcamp, rahul286, saurabhshukla, manishsongirkar36, faishal, desaiuditd, darren-slatten, jk3us, daankortenbach, telofy, pjv, llonchj, jinnko, weskoop, bcole808, gungeekatx, rohanveer, chandrapatel, gagan0123
3
  Tags: nginx, cache, purge, nginx map, nginx cache, maps, fastcgi, proxy, redis, redis-cache, rewrite, permalinks
4
  Requires at least: 3.0
5
+ Tested up to: 4.5
6
+ Stable tag: 1.9.6
7
  License: GPLv2 or later (of-course)
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Donate Link: http://rtcamp.com/donate/
114
 
115
  == Changelog ==
116
 
117
+ = 1.9.6 =
118
+ * Fixed cache purging on post publish.
119
+ * Error fixed when redis server not installed.
120
+
121
  = 1.9.5 =
122
  Added custom purge URL option.
123
 
322
 
323
  == Upgrade Notice ==
324
 
325
+ = 1.9.6 =
326
+ * Fixed cache purging on post publish.
327
+ * Error fixed when redis server not installed.