Redis Object Cache - Version 1.5.5

Version Description

Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.

  • Removed lowercasing keys
  • Remove scheduled metrics event
  • Fixed Redis version call when using replication
Download this release

Release Info

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

Code changes from version 1.5.4 to 1.5.5

Files changed (3) hide show
  1. includes/object-cache.php +10 -7
  2. readme.txt +12 -4
  3. redis-cache.php +6 -2
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.5.4
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
@@ -572,11 +572,14 @@ class WP_Object_Cache
572
  $this->redis->ping();
573
  }
574
 
575
- $server_info = $this->redis->info( 'SERVER' );
576
- if (isset($server_info['redis_version'])) {
577
- $this->redis_version = $server_info['redis_version'];
578
- } elseif (isset( $server_info['Server']['redis_version'])) {
579
- $this->redis_version = $server_info['Server']['redis_version'];
 
 
 
580
  }
581
 
582
  $this->redis_connected = true;
@@ -1264,7 +1267,7 @@ LUA;
1264
 
1265
  $prefix = trim($prefix, '_-:$');
1266
 
1267
- return strtolower("{$salt}{$prefix}:{$group}:{$key}");
1268
  }
1269
 
1270
  /**
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.5.5
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
572
  $this->redis->ping();
573
  }
574
 
575
+ if ( ! isset( $options['replication'] ) || ! $options['replication'] ) {
576
+ $server_info = $this->redis->info( 'SERVER' );
577
+
578
+ if (isset($server_info['redis_version'])) {
579
+ $this->redis_version = $server_info['redis_version'];
580
+ } elseif (isset( $server_info['Server']['redis_version'])) {
581
+ $this->redis_version = $server_info['Server']['redis_version'];
582
+ }
583
  }
584
 
585
  $this->redis_connected = true;
1267
 
1268
  $prefix = trim($prefix, '_-:$');
1269
 
1270
+ return "{$salt}{$prefix}:{$group}:{$key}";
1271
  }
1272
 
1273
  /**
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: redis, predis, phpredis, hhvm, pecl, caching, cache, object cache, perform
5
  Requires at least: 3.3
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
- Stable tag: 1.5.4
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -217,14 +217,22 @@ The following commands are supported:
217
 
218
  == Changelog ==
219
 
 
 
 
 
 
 
 
 
220
  = 1.5.4 =
221
 
222
- - Removed metrics
223
 
224
  = 1.5.3 =
225
 
226
- - Fixed: Call to undefined function `get_plugin_data()`
227
- - Fixed: Call to undefined method `WP_Object_Cache::redis_version()`
228
 
229
  = 1.5.2 =
230
 
5
  Requires at least: 3.3
6
  Tested up to: 5.3
7
  Requires PHP: 5.4
8
+ Stable tag: 1.5.5
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
217
 
218
  == Changelog ==
219
 
220
+ = 1.5.5 =
221
+
222
+ Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.
223
+
224
+ * Removed lowercasing keys
225
+ * Remove scheduled metrics event
226
+ * Fixed Redis version call when using replication
227
+
228
  = 1.5.4 =
229
 
230
+ * Removed metrics
231
 
232
  = 1.5.3 =
233
 
234
+ * Fixed: Call to undefined function `get_plugin_data()`
235
+ * Fixed: Call to undefined method `WP_Object_Cache::redis_version()`
236
 
237
  = 1.5.2 =
238
 
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.5.4
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'WP_REDIS_VERSION', '1.5.4' );
20
 
21
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
22
  require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php';
@@ -95,6 +95,10 @@ class RedisObjectCache {
95
 
96
  }
97
 
 
 
 
 
98
  // show admin page
99
  require_once plugin_dir_path( __FILE__ ) . '/includes/admin-page.php';
100
 
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.5.5
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss
16
  exit;
17
  }
18
 
19
+ define( 'WP_REDIS_VERSION', '1.5.5' );
20
 
21
  if ( defined( 'WP_CLI' ) && WP_CLI ) {
22
  require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php';
95
 
96
  }
97
 
98
+ if ( wp_next_scheduled( 'redis_gather_metrics' ) ) {
99
+ wp_clear_scheduled_hook( 'redis_gather_metrics' );
100
+ }
101
+
102
  // show admin page
103
  require_once plugin_dir_path( __FILE__ ) . '/includes/admin-page.php';
104