Redis Object Cache - Version 2.1.0

Version Description

Download this release

Release Info

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

Code changes from version 2.1.1 to 2.1.0

includes/class-plugin.php CHANGED
@@ -281,7 +281,7 @@ class Plugin {
281
  return;
282
  }
283
 
284
- wp_enqueue_style( 'redis-cache', WP_REDIS_PLUGIN_DIR . '/assets/css/admin.css', null, WP_REDIS_VERSION );
285
  }
286
 
287
  /**
281
  return;
282
  }
283
 
284
+ wp_enqueue_style( 'redis-cache', WP_REDIS_DIR . '/assets/css/admin.css', null, WP_REDIS_VERSION );
285
  }
286
 
287
  /**
includes/diagnostics.php CHANGED
@@ -119,22 +119,22 @@ if ( defined( 'WP_REDIS_PASSWORD' ) ) {
119
 
120
  if ( $dropin && ! $disabled ) {
121
  $info['Global Groups'] = wp_json_encode(
122
- array_values( $wp_object_cache->global_groups ?? [] ),
123
  JSON_PRETTY_PRINT
124
  );
125
 
126
  $info['Ignored Groups'] = wp_json_encode(
127
- array_values( $wp_object_cache->ignored_groups ?? [] ),
128
  JSON_PRETTY_PRINT
129
  );
130
 
131
  $info['Unflushable Groups'] = wp_json_encode(
132
- array_values( $wp_object_cache->unflushable_groups ?? [] ),
133
  JSON_PRETTY_PRINT
134
  );
135
 
136
  $info['Groups Types'] = wp_json_encode(
137
- $wp_object_cache->group_type ?? null,
138
  JSON_PRETTY_PRINT
139
  );
140
  }
119
 
120
  if ( $dropin && ! $disabled ) {
121
  $info['Global Groups'] = wp_json_encode(
122
+ array_values( $wp_object_cache->global_groups ),
123
  JSON_PRETTY_PRINT
124
  );
125
 
126
  $info['Ignored Groups'] = wp_json_encode(
127
+ array_values( $wp_object_cache->ignored_groups ),
128
  JSON_PRETTY_PRINT
129
  );
130
 
131
  $info['Unflushable Groups'] = wp_json_encode(
132
+ array_values( $wp_object_cache->unflushable_groups ),
133
  JSON_PRETTY_PRINT
134
  );
135
 
136
  $info['Groups Types'] = wp_json_encode(
137
+ $wp_object_cache->group_type,
138
  JSON_PRETTY_PRINT
139
  );
140
  }
includes/object-cache.php CHANGED
@@ -3,12 +3,12 @@
3
  * Plugin Name: Redis Object Cache Drop-In
4
  * Plugin URI: https://wordpress.org/plugins/redis-cache/
5
  * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
6
- * Version: 2.1.1
7
  * Author: Till Krüss
8
  * Author URI: https://objectcache.pro
9
  * License: GPLv3
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
- * Requires PHP: 7.2
12
  *
13
  * @package Rhubarb\RedisCache
14
  */
@@ -686,23 +686,19 @@ class WP_Object_Cache {
686
 
687
  $this->diagnostics[ 'shards' ] = WP_REDIS_SHARDS;
688
  } elseif ( defined( 'WP_REDIS_CLUSTER' ) ) {
689
- if ( is_string( WP_REDIS_CLUSTER ) ) {
690
- $this->redis = new RedisCluster( WP_REDIS_CLUSTER );
691
- } else {
692
- $args = [
693
- 'cluster' => $this->build_cluster_connection_array(),
694
- 'timeout' => $parameters['timeout'],
695
- 'read_timeout' => $parameters['read_timeout'],
696
- 'persistent' => $parameters['persistent'],
697
- ];
698
-
699
- if ( isset( $parameters['password'] ) && version_compare( $version, '4.3.0', '>=' ) ) {
700
- $args['password'] = $parameters['password'];
701
- }
702
 
703
- $this->redis = new RedisCluster( null, ...array_values( $args ) );
 
704
  }
705
 
 
 
706
  $this->diagnostics += $args;
707
  } else {
708
  $this->redis = new Redis();
3
  * Plugin Name: Redis Object Cache Drop-In
4
  * Plugin URI: https://wordpress.org/plugins/redis-cache/
5
  * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
6
+ * Version: 2.1.0
7
  * Author: Till Krüss
8
  * Author URI: https://objectcache.pro
9
  * License: GPLv3
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
+ * Requires PHP: 7.0
12
  *
13
  * @package Rhubarb\RedisCache
14
  */
686
 
687
  $this->diagnostics[ 'shards' ] = WP_REDIS_SHARDS;
688
  } elseif ( defined( 'WP_REDIS_CLUSTER' ) ) {
689
+ $args = [
690
+ 'cluster' => $this->build_cluster_connection_array(),
691
+ 'timeout' => $parameters['timeout'],
692
+ 'read_timeout' => $parameters['read_timeout'],
693
+ 'persistent' => $parameters['persistent'],
694
+ ];
 
 
 
 
 
 
 
695
 
696
+ if ( isset( $parameters['password'] ) && version_compare( $version, '4.3.0', '>=' ) ) {
697
+ $args['password'] = $parameters['password'];
698
  }
699
 
700
+ $this->redis = new RedisCluster( null, ...array_values( $args ) );
701
+
702
  $this->diagnostics += $args;
703
  } else {
704
  $this->redis = new Redis();
includes/ui/settings.php CHANGED
@@ -98,7 +98,7 @@ defined( '\\ABSPATH' ) || exit;
98
  </p>
99
  </div>
100
 
101
- <?php $is_php7 = version_compare( phpversion(), '7.2', '>=' ); ?>
102
  <?php $is_phpredis311 = version_compare( phpversion( 'redis' ), '3.1.1', '>=' ); ?>
103
  <?php $phpredis_installed = (bool) phpversion( 'redis' ); ?>
104
 
@@ -122,7 +122,7 @@ defined( '\\ABSPATH' ) || exit;
122
  <?php
123
  printf(
124
  // translators: %s = PHP Version.
125
- esc_html__( 'The current version of PHP (%s) is too old. PHP 7.2 or newer is required.', 'redis-cache' ),
126
  esc_html( phpversion() )
127
  );
128
  ?>
98
  </p>
99
  </div>
100
 
101
+ <?php $is_php7 = version_compare( phpversion(), '7.0', '>=' ); ?>
102
  <?php $is_phpredis311 = version_compare( phpversion( 'redis' ), '3.1.1', '>=' ); ?>
103
  <?php $phpredis_installed = (bool) phpversion( 'redis' ); ?>
104
 
122
  <?php
123
  printf(
124
  // translators: %s = PHP Version.
125
+ esc_html__( 'The current version of PHP (%s) is too old. PHP 7.0 or newer is required.', 'redis-cache' ),
126
  esc_html( phpversion() )
127
  );
128
  ?>
languages/redis-cache.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPLv3.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Redis Object Cache 2.1.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-07-18T16:28:07+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: redis-cache\n"
@@ -358,7 +358,7 @@ msgstr ""
358
 
359
  #. translators: %s = PHP Version.
360
  #: includes/ui/settings.php:125
361
- msgid "The current version of PHP (%s) is too old. PHP 7.2 or newer is required."
362
  msgstr ""
363
 
364
  #: includes/ui/settings.php:134
2
  # This file is distributed under the GPLv3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Redis Object Cache 2.1.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-07-13T16:42:49+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: redis-cache\n"
358
 
359
  #. translators: %s = PHP Version.
360
  #: includes/ui/settings.php:125
361
+ msgid "The current version of PHP (%s) is too old. PHP 7.0 or newer is required."
362
  msgstr ""
363
 
364
  #: includes/ui/settings.php:134
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === Redis Object Cache ===
2
  Contributors: tillkruess
3
  Donate link: https://github.com/sponsors/tillkruss
4
- Tags: redis, predis, phpredis, credis, relay, caching, cache, object cache, performance, replication, clustering, keydb
5
  Requires at least: 3.3
6
  Tested up to: 6.0
7
- Requires PHP: 7.2
8
- Stable tag: 2.1.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -83,25 +83,6 @@ To see a list of all available WP-CLI commands, please see the [WP CLI commands
83
 
84
  == Changelog ==
85
 
86
- = 2.1.1 =
87
-
88
- - Bumped PHP requirement to 7.2
89
- - Renamed `WP_REDIS_DIR` to `WP_REDIS_PLUGIN_DIR`
90
- - Fixed rare fatal error in diagnostics
91
- - Allow Predis v1.1 Composer installs
92
- - Support using `WP_REDIS_CLUSTER` string
93
-
94
- = 2.1.0 =
95
-
96
- - Bumped PHP requirement to 7.0
97
- - Deprecated Credis and HHVM clients
98
- - Updated Predis to v2.0.0
99
- - Updated Credis to v1.13.1
100
- - Improved cluster readability in diagnostics
101
- - Improved connecting to clusters
102
- - Fixed pinging clusters after connecting
103
- - Fixed several bugs in `connect_using_credis()`
104
-
105
  = 2.0.26 =
106
 
107
  - Fixed a bug in `wp_cache_delete_multiple()` when using Predis
@@ -572,6 +553,6 @@ Since Predis isn't maintained any longer, it's highly recommended to switch over
572
 
573
  == Upgrade Notice ==
574
 
575
- = 2.1.1 =
576
 
577
- Bumped PHP requirement to 7.2, updated Predis to v2.0 and deprecated Credis and HHVM clients.
1
  === Redis Object Cache ===
2
  Contributors: tillkruess
3
  Donate link: https://github.com/sponsors/tillkruss
4
+ Tags: redis, predis, phpredis, credis, pecl, relay, caching, cache, object cache, performance, replication, clustering, keydb
5
  Requires at least: 3.3
6
  Tested up to: 6.0
7
+ Requires PHP: 5.6
8
+ Stable tag: 2.1.0
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  = 2.0.26 =
87
 
88
  - Fixed a bug in `wp_cache_delete_multiple()` when using Predis
553
 
554
  == Upgrade Notice ==
555
 
556
+ = 2.0.26 =
557
 
558
+ WordPress 6.0 compatibility fixes.
redis-cache.php CHANGED
@@ -3,11 +3,11 @@
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, Relay, replication, sentinels, clustering and WP-CLI.
6
- * Version: 2.1.1
7
  * Text Domain: redis-cache
8
  * Domain Path: /languages
9
  * Network: true
10
- * Requires PHP: 7.2
11
  * Author: Till Krüss
12
  * Author URI: https://objectcache.pro
13
  * GitHub Plugin URI: https://github.com/rhubarbgroup/redis-cache
@@ -22,7 +22,7 @@ defined( 'ABSPATH' ) || exit;
22
  define( 'WP_REDIS_FILE', __FILE__ );
23
  define( 'WP_REDIS_PLUGIN_PATH', __DIR__ );
24
  define( 'WP_REDIS_BASENAME', plugin_basename( WP_REDIS_FILE ) );
25
- define( 'WP_REDIS_PLUGIN_DIR', plugin_dir_url( WP_REDIS_FILE ) );
26
 
27
  $meta = get_file_data( WP_REDIS_FILE, [ 'Version' => 'Version' ] );
28
 
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, Relay, replication, sentinels, clustering and WP-CLI.
6
+ * Version: 2.1.0
7
  * Text Domain: redis-cache
8
  * Domain Path: /languages
9
  * Network: true
10
+ * Requires PHP: 7.0
11
  * Author: Till Krüss
12
  * Author URI: https://objectcache.pro
13
  * GitHub Plugin URI: https://github.com/rhubarbgroup/redis-cache
22
  define( 'WP_REDIS_FILE', __FILE__ );
23
  define( 'WP_REDIS_PLUGIN_PATH', __DIR__ );
24
  define( 'WP_REDIS_BASENAME', plugin_basename( WP_REDIS_FILE ) );
25
+ define( 'WP_REDIS_DIR', plugin_dir_url( WP_REDIS_FILE ) );
26
 
27
  $meta = get_file_data( WP_REDIS_FILE, [ 'Version' => 'Version' ] );
28