Redis Object Cache - Version 1.4.1

Version Description

  • Fixed potential fatal error related to wp_suspend_cache_addition()
Download this release

Release Info

Developer tillkruess
Plugin Icon 128x128 Redis Object Cache
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

Files changed (3) hide show
  1. includes/object-cache.php +6 -2
  2. readme.txt +5 -1
  3. redis-cache.php +1 -1
includes/object-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Redis Object Cache Drop-In
4
  Plugin URI: http://wordpress.org/plugins/redis-cache/
5
  Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, HHVM, replication, clustering and WP-CLI.
6
- Version: 1.4.0
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
@@ -581,7 +581,11 @@ class WP_Object_Cache
581
  */
582
  protected function add_or_replace($add, $key, $value, $group = 'default', $expiration = 0)
583
  {
584
- if ( $add && wp_suspend_cache_addition() ) {
 
 
 
 
585
  return false;
586
  }
587
 
3
  Plugin Name: Redis Object Cache Drop-In
4
  Plugin URI: http://wordpress.org/plugins/redis-cache/
5
  Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, HHVM, replication, clustering and WP-CLI.
6
+ Version: 1.4.1
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
581
  */
582
  protected function add_or_replace($add, $key, $value, $group = 'default', $expiration = 0)
583
  {
584
+ $cache_addition_suspended = function_exists('wp_suspend_cache_addition')
585
+ ? wp_suspend_cache_addition()
586
+ : false;
587
+
588
+ if ( $add && $cache_addition_suspended ) {
589
  return false;
590
  }
591
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/tillkruss
4
  Tags: redis, predis, phpredis, hhvm, pecl, caching, cache, object cache, performance, replication, clustering
5
  Requires at least: 3.3
6
  Tested up to: 5.0
7
- Stable tag: 1.4.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -175,6 +175,10 @@ The following commands are supported:
175
 
176
  == Changelog ==
177
 
 
 
 
 
178
  = 1.4.0 =
179
 
180
  * Added support for igbinary
4
  Tags: redis, predis, phpredis, hhvm, pecl, caching, cache, object cache, performance, replication, clustering
5
  Requires at least: 3.3
6
  Tested up to: 5.0
7
+ Stable tag: 1.4.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
175
 
176
  == Changelog ==
177
 
178
+ = 1.4.1 =
179
+
180
+ * Fixed potential fatal error related to `wp_suspend_cache_addition()`
181
+
182
  = 1.4.0 =
183
 
184
  * Added support for igbinary
redis-cache.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Redis Object Cache
4
  Plugin URI: https://wordpress.org/plugins/redis-cache/
5
  Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, HHVM, replication, clustering and WP-CLI.
6
- Version: 1.4.0
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss
3
  Plugin Name: Redis Object Cache
4
  Plugin URI: https://wordpress.org/plugins/redis-cache/
5
  Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, HHVM, replication, clustering and WP-CLI.
6
+ Version: 1.4.1
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss