Redis Object Cache - Version 1.3.9

Version Description

  • Fixed WP_REDIS_SHARDS not showing up in server list
    • Fixed WP_REDIS_SHARDS not working when using PECL extension
    • Removed WP_REDIS_SCHEME and WP_REDIS_PATH leftovers
Download this release

Release Info

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

Code changes from version 1.3.8 to 1.3.9

includes/diagnostics.php CHANGED
@@ -40,10 +40,8 @@ if ( $dropin ) {
40
  $constants = array(
41
  'WP_REDIS_DISABLED',
42
  'WP_REDIS_CLIENT',
43
- 'WP_REDIS_SCHEME',
44
  'WP_REDIS_HOST',
45
  'WP_REDIS_PORT',
46
- 'WP_REDIS_PATH',
47
  'WP_REDIS_DATABASE',
48
  'WP_REDIS_SERVERS',
49
  'WP_REDIS_CLUSTER',
@@ -51,8 +49,8 @@ $constants = array(
51
  'WP_REDIS_SENTINEL',
52
  'WP_REDIS_MAXTTL',
53
  'WP_CACHE_KEY_SALT',
54
- 'WP_REDIS_GLOBAL_GROUPS',
55
- 'WP_REDIS_IGNORED_GROUPS',
56
  );
57
 
58
  foreach ( $constants as $constant ) {
40
  $constants = array(
41
  'WP_REDIS_DISABLED',
42
  'WP_REDIS_CLIENT',
 
43
  'WP_REDIS_HOST',
44
  'WP_REDIS_PORT',
 
45
  'WP_REDIS_DATABASE',
46
  'WP_REDIS_SERVERS',
47
  'WP_REDIS_CLUSTER',
49
  'WP_REDIS_SENTINEL',
50
  'WP_REDIS_MAXTTL',
51
  'WP_CACHE_KEY_SALT',
52
+ 'WP_REDIS_GLOBAL_GROUPS',
53
+ 'WP_REDIS_IGNORED_GROUPS',
54
  );
55
 
56
  foreach ( $constants as $constant ) {
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.3.8
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
@@ -424,7 +424,7 @@ class WP_Object_Cache
424
  $this->redis_client = sprintf('PhpRedis (v%s)', phpversion('redis'));
425
 
426
  if (defined('WP_REDIS_SHARDS')) {
427
- $this->redis = new RedisArray(array_values(WP_REDIS_CLUSTER));
428
  } elseif (defined('WP_REDIS_CLUSTER')) {
429
  $this->redis = new RedisCluster(null, array_values(WP_REDIS_CLUSTER));
430
  } else {
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.3.9
7
  Author: Till Krüss
8
  Author URI: https://till.im/
9
  License: GPLv3
424
  $this->redis_client = sprintf('PhpRedis (v%s)', phpversion('redis'));
425
 
426
  if (defined('WP_REDIS_SHARDS')) {
427
+ $this->redis = new RedisArray(array_values(WP_REDIS_SHARDS));
428
  } elseif (defined('WP_REDIS_CLUSTER')) {
429
  $this->redis = new RedisCluster(null, array_values(WP_REDIS_CLUSTER));
430
  } else {
includes/servers-list.php CHANGED
@@ -101,6 +101,10 @@ class Servers_List extends WP_List_Table {
101
  }
102
  }
103
 
 
 
 
 
104
  if ( defined( 'WP_REDIS_CLUSTER' ) ) {
105
  $servers = WP_REDIS_CLUSTER;
106
  }
101
  }
102
  }
103
 
104
+ if ( defined( 'WP_REDIS_SHARDS' ) ) {
105
+ $servers = WP_REDIS_SHARDS;
106
+ }
107
+
108
  if ( defined( 'WP_REDIS_CLUSTER' ) ) {
109
  $servers = WP_REDIS_CLUSTER;
110
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: tillkruess
3
  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: 4.9
7
- Stable tag: 1.3.8
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -42,10 +42,6 @@ To adjust the connection parameters, define any of the following constants in yo
42
 
43
  Specifies the client used to communicate with Redis. Supports `hhvm`, `pecl` and `predis`.
44
 
45
- * `WP_REDIS_SCHEME` (default: `tcp`)
46
-
47
- Specifies the protocol used to communicate with an instance of Redis. Internally the client uses the connection class associated to the specified connection scheme. Supports `tcp` (TCP/IP), `unix` (UNIX domain sockets), `tls` (transport layer security) or `http` (HTTP protocol through Webdis).
48
-
49
  * `WP_REDIS_HOST` (default: `127.0.0.1`)
50
 
51
  IP or hostname of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
@@ -54,10 +50,6 @@ To adjust the connection parameters, define any of the following constants in yo
54
 
55
  TCP/IP port of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
56
 
57
- * `WP_REDIS_PATH` (default: _not set_)
58
-
59
- Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets.
60
-
61
  * `WP_REDIS_DATABASE` (default: `0`)
62
 
63
  Accepts a numeric value that is used to automatically select a logical database with the `SELECT` command.
@@ -171,6 +163,12 @@ The following commands are supported:
171
 
172
  == Changelog ==
173
 
 
 
 
 
 
 
174
  = 1.3.8 =
175
 
176
  * Switched from single file Predis version to full library
@@ -304,7 +302,11 @@ The following commands are supported:
304
 
305
  == Upgrade Notice ==
306
 
307
- = 1.3.7 =
 
 
 
 
308
 
309
  This update contains a critical fix for Predis.
310
 
3
  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.3.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
42
 
43
  Specifies the client used to communicate with Redis. Supports `hhvm`, `pecl` and `predis`.
44
 
 
 
 
 
45
  * `WP_REDIS_HOST` (default: `127.0.0.1`)
46
 
47
  IP or hostname of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
50
 
51
  TCP/IP port of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
52
 
 
 
 
 
53
  * `WP_REDIS_DATABASE` (default: `0`)
54
 
55
  Accepts a numeric value that is used to automatically select a logical database with the `SELECT` command.
163
 
164
  == Changelog ==
165
 
166
+ = 1.3.9 =
167
+
168
+ * Fixed `WP_REDIS_SHARDS` not showing up in server list
169
+ * Fixed `WP_REDIS_SHARDS` not working when using PECL extension
170
+ * Removed `WP_REDIS_SCHEME` and `WP_REDIS_PATH` leftovers
171
+
172
  = 1.3.8 =
173
 
174
  * Switched from single file Predis version to full library
302
 
303
  == Upgrade Notice ==
304
 
305
+ = 1.3.9 =
306
+
307
+ This update contains fixes for sharding.
308
+
309
+ = 1.3.8 =
310
 
311
  This update contains a critical fix for Predis.
312
 
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.3.8
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.3.9
7
  Text Domain: redis-cache
8
  Domain Path: /languages
9
  Author: Till Krüss