From b8084d32625b3e962abc60d3d4aeb0b12f2fe5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Mon, 22 Apr 2024 12:03:21 -0700 Subject: [PATCH 01/25] bump tested version --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index ace4b906..044f1722 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: tillkruess Donate link: https://github.com/sponsors/tillkruss Tags: redis, object cache, caching, performance, relay Requires at least: 4.6 -Tested up to: 6.4 +Tested up to: 6.5 Requires PHP: 7.2 Stable tag: 2.5.2 License: GPLv3 From 99afdddc73693c42161e6a47d0573942fc73061e Mon Sep 17 00:00:00 2001 From: Max BrownGold Date: Fri, 3 May 2024 11:02:13 -0400 Subject: [PATCH 02/25] adds support for ssl context in redis clusters (#518) --- includes/object-cache.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/includes/object-cache.php b/includes/object-cache.php index 7fc0d093..b28d6055 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -690,6 +690,14 @@ protected function connect_using_phpredis( $parameters ) { $args['password'] = $parameters['password']; } + if ( version_compare( $version, '5.3.0', '>=' ) && defined( 'WP_REDIS_SSL_CONTEXT' ) && ! empty( WP_REDIS_SSL_CONTEXT ) ) { + if ( ! array_key_exists( 'password', $args ) ) { + $args['password'] = null; + } + + $args['ssl'] = WP_REDIS_SSL_CONTEXT; + } + $this->redis = new RedisCluster( null, ...array_values( $args ) ); $this->diagnostics += $args; } From eae072532c94fb76898db3161bafc62623dfd2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Fri, 3 May 2024 08:05:53 -0700 Subject: [PATCH 03/25] drop 7.2 linting --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 386cc52e..fc0527b7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,8 +17,8 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.2', '7.4', '8.2'] - relay: ['0.5.1'] + php: ['7.4', '8.2'] + relay: ['0.7.0'] steps: - name: Checkout From 00bd8a25fb1cc1d1c085d71a4e1f0a01aa1fadea Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Fri, 3 May 2024 18:06:10 +0300 Subject: [PATCH 04/25] Fixed issue with Predis and replication connection (#520) --- CHANGELOG.md | 4 ++++ includes/object-cache.php | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85235a31..2da9d1a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Fixed `wp_cache_flush_group` issue with Predis and replication connection + ## 2.5.2 - Respect `WP_REDIS_FLUSH_TIMEOUT` in Lua flush scripts diff --git a/includes/object-cache.php b/includes/object-cache.php index b28d6055..7639c0cf 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1612,8 +1612,12 @@ protected function execute_lua_script( $script ) { $flushTimeout = defined( 'WP_REDIS_FLUSH_TIMEOUT' ) ? WP_REDIS_FLUSH_TIMEOUT : 5; if ( $this->is_predis() ) { - $timeout = $this->redis->getConnection()->getParameters()->read_write_timeout ?? ini_get( 'default_socket_timeout' ); - stream_set_timeout( $this->redis->getConnection()->getResource(), $flushTimeout ); + $connection = $this->redis->getConnection(); + if ($connection instanceof Predis\Connection\Replication\ReplicationInterface) { + $connection = $connection->getMaster(); + } + $timeout = $connection->getParameters()->read_write_timeout ?? ini_get( 'default_socket_timeout' ); + stream_set_timeout( $connection->getResource(), $flushTimeout ); } else { $timeout = $this->redis->getOption( Redis::OPT_READ_TIMEOUT ); $this->redis->setOption( Redis::OPT_READ_TIMEOUT, $flushTimeout ); @@ -1627,7 +1631,7 @@ protected function execute_lua_script( $script ) { } if ( $this->is_predis() ) { - stream_set_timeout( $this->redis->getConnection()->getResource(), $timeout ); + stream_set_timeout( $connection->getResource(), $timeout ); } else { $this->redis->setOption( Redis::OPT_READ_TIMEOUT, $timeout ); } From 62850777a825576f6d02500cac88c3749861d9b7 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Thu, 6 Jun 2024 20:33:29 +0300 Subject: [PATCH 05/25] Fixed loading textdomain in show_error_and_die (#533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed loading textdomain in * use helper --------- Co-authored-by: Till Krüss --- CHANGELOG.md | 1 + includes/object-cache.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2da9d1a3..71128aff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Fixed `wp_cache_flush_group` issue with Predis and replication connection +- Fixed rare fatal error in `show_error_and_die()` (one more time) ## 2.5.2 diff --git a/includes/object-cache.php b/includes/object-cache.php index 7639c0cf..2535b9f7 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -2971,6 +2971,8 @@ protected function show_error_and_die( Exception $exception ) { add_filter( 'pre_determine_locale', function () { return defined( 'WPLANG' ) ? WPLANG : 'en_US'; } ); + + add_filter( 'pre_get_language_files_from_path', '__return_empty_array' ); } // Load custom Redis error template, if present. From 61003da5d2e793b977fc2ae200e9c06a33a6f821 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Mon, 10 Jun 2024 21:06:20 +0300 Subject: [PATCH 06/25] Introduce WP_REDIS_DISABLE_GROUP_FLUSH to disable group flushing (#532) --- README.md | 1 + includes/object-cache.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 1b6d3f92..40b3ca92 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ The Redis Object Cache plugin comes with vast set of configuration options. If y | `WP_REDIS_DISABLE_BANNERS` | `false` | Disables promotional banners | | `WP_REDIS_DISABLE_DROPIN_CHECK` | `false` | Disables the extended drop-in write test | | `WP_REDIS_DISABLE_DROPIN_AUTOUPDATE` | `false` | Disables the drop-in auto-update | +| `WP_REDIS_DISABLE_GROUP_FLUSH` | `false` | Disables group flushing with Lua script and uses `flushdb` call instead | | `WP_REDIS_SSL_CONTEXT` | `[]` | TLS connection options for `tls` or `rediss` scheme | diff --git a/includes/object-cache.php b/includes/object-cache.php index 2535b9f7..61b0c429 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1768,6 +1768,10 @@ public function flush() { * @return bool Returns TRUE on success or FALSE on failure. */ public function flush_group( $group ) { + if ( defined( 'WP_REDIS_DISABLE_GROUP_FLUSH' ) && WP_REDIS_DISABLE_GROUP_FLUSH ) { + return $this->flush(); + } + $san_group = $this->sanitize_key_part( $group ); if ( is_multisite() && ! $this->is_global_group( $san_group ) ) { From 781430ad5126f88d19e80b3e75b67b1c02122e37 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Mon, 10 Jun 2024 23:13:08 +0300 Subject: [PATCH 07/25] Fix Redis version determination for predis replication connection (#522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add check that redis_version is set * Fetch Redis server info for replicated connections * change style * Update CHANGELOG.md --------- Co-authored-by: Till Krüss --- CHANGELOG.md | 2 +- includes/object-cache.php | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71128aff..3804d85c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Fixed `wp_cache_flush_group` issue with Predis and replication connection +- Fixed issues with Predis and replication connections - Fixed rare fatal error in `show_error_and_die()` (one more time) ## 2.5.2 diff --git a/includes/object-cache.php b/includes/object-cache.php index 61b0c429..abac5c94 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1139,22 +1139,16 @@ protected function connect_using_hhvm( $parameters ) { * @return void */ public function fetch_info() { - $options = method_exists( $this->redis, 'getOptions' ) - ? $this->redis->getOptions() - : new stdClass(); - - if ( isset( $options->replication ) && $options->replication ) { - return; - } - if ( defined( 'WP_REDIS_CLUSTER' ) ) { $connectionId = is_string( WP_REDIS_CLUSTER ) ? 'SERVER' : current( $this->build_cluster_connection_array() ); - $info = $this->determine_client() === 'predis' + $info = $this->is_predis() ? $this->redis->getClientBy( 'id', $connectionId )->info() : $this->redis->info( $connectionId ); + } else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\MasterSlaveReplication) { + $info = $this->redis->getClientBy( 'role' , 'master' )->info(); } else { $info = $this->redis->info(); } @@ -1888,7 +1882,7 @@ protected function lua_flush_closure( $salt, $escape = true ) { return i LUA; - if ( version_compare( $this->redis_version(), '5', '<' ) && version_compare( $this->redis_version(), '3.2', '>=' ) ) { + if ( isset($this->redis_version) && version_compare( $this->redis_version, '5', '<' ) && version_compare( $this->redis_version, '3.2', '>=' ) ) { $script = 'redis.replicate_commands()' . "\n" . $script; } @@ -1940,7 +1934,7 @@ function ( $group ) { until 0 == cur return i LUA; - if ( version_compare( $this->redis_version(), '5', '<' ) && version_compare( $this->redis_version(), '3.2', '>=' ) ) { + if ( isset($this->redis_version) && version_compare( $this->redis_version, '5', '<' ) && version_compare( $this->redis_version, '3.2', '>=' ) ) { $script = 'redis.replicate_commands()' . "\n" . $script; } From d4e449751b5e4f0643d2679f2224b615e54aafa4 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Mon, 10 Jun 2024 23:15:48 +0300 Subject: [PATCH 08/25] Fix Predis cluster flush (#529) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Predis cluster flush * Update CHANGELOG.md --------- Co-authored-by: Till Krüss --- CHANGELOG.md | 2 +- includes/class-predis.php | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3804d85c..efb65633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -- Fixed issues with Predis and replication connections +- Fixed several issues with Predis and cluster/replicated connection - Fixed rare fatal error in `show_error_and_die()` (one more time) ## 2.5.2 diff --git a/includes/class-predis.php b/includes/class-predis.php index 8f2f55f3..e3ccbb06 100644 --- a/includes/class-predis.php +++ b/includes/class-predis.php @@ -139,11 +139,10 @@ public function connect( $read_timeout = null ) { * @return bool */ public function flush( $throw_exception = false ) { - $flush_timeout = defined( 'WP_REDIS_FLUSH_TIMEOUT' ) - ? intval( WP_REDIS_FLUSH_TIMEOUT ) - : 5; - if ( is_null( $this->redis ) ) { + $flush_timeout = defined( 'WP_REDIS_FLUSH_TIMEOUT' ) + ? intval( WP_REDIS_FLUSH_TIMEOUT ) + : 5; try { $this->connect( $flush_timeout ); } catch ( Exception $exception ) { @@ -153,16 +152,16 @@ public function flush( $throw_exception = false ) { return false; } - } - if ( is_null( $this->redis ) ) { - return false; + if ( is_null( $this->redis ) ) { + return false; + } } if ( defined( 'WP_REDIS_CLUSTER' ) ) { try { - foreach ( $this->redis->_masters() as $master ) { - $this->redis->flushdb( $master ); + foreach ( $this->redis->getIterator() as $master ) { + $master->flushdb(); } } catch ( Exception $exception ) { if ( $throw_exception ) { From 9dedfe335abcba91478ac99c064776abe86e9dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Tue, 2 Jul 2024 13:40:42 -0700 Subject: [PATCH 09/25] document WP_REDIS_DISABLE_COMMENT --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40b3ca92..538c4024 100644 --- a/README.md +++ b/README.md @@ -58,10 +58,11 @@ The Redis Object Cache plugin comes with vast set of configuration options. If y | `WP_REDIS_DISABLED` | `false` | Emergency switch to bypass the object cache without deleting the drop-in | | `WP_REDIS_DISABLE_ADMINBAR` | `false` | Disables admin bar display | | `WP_REDIS_DISABLE_METRICS` | `false` | Disables metrics collection and display | -| `WP_REDIS_DISABLE_BANNERS` | `false` | Disables promotional banners | | `WP_REDIS_DISABLE_DROPIN_CHECK` | `false` | Disables the extended drop-in write test | | `WP_REDIS_DISABLE_DROPIN_AUTOUPDATE` | `false` | Disables the drop-in auto-update | | `WP_REDIS_DISABLE_GROUP_FLUSH` | `false` | Disables group flushing with Lua script and uses `flushdb` call instead | +| `WP_REDIS_DISABLE_BANNERS` | `false` | Disables promotional banners and notices | +| `WP_REDIS_DISABLE_COMMENT` | `false` | Disables HTML source comment | | `WP_REDIS_SSL_CONTEXT` | `[]` | TLS connection options for `tls` or `rediss` scheme | From c67f84d3043c545502a372b337ef9b00233280d7 Mon Sep 17 00:00:00 2001 From: Patrick Garman Date: Thu, 11 Jul 2024 19:12:19 -0500 Subject: [PATCH 10/25] Add filter to allow customizing who can flush the cache (#535) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add filter and constant to allow customizing who can manage the plugin * Update CHANGELOG.md * Update README.md --------- Co-authored-by: Till Krüss --- CHANGELOG.md | 2 ++ README.md | 10 ++++++---- includes/class-plugin.php | 14 +++++++++++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efb65633..9e369188 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Fixed several issues with Predis and cluster/replicated connection - Fixed rare fatal error in `show_error_and_die()` (one more time) +- Add `redis_cache_manager_capability` filter +- Add `WP_REDIS_MANAGER_CAPABILITY` constant ## 2.5.2 diff --git a/README.md b/README.md index 538c4024..9ac3cf44 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ The Redis Object Cache plugin comes with vast set of configuration options. If y | `WP_REDIS_DISABLE_BANNERS` | `false` | Disables promotional banners and notices | | `WP_REDIS_DISABLE_COMMENT` | `false` | Disables HTML source comment | | `WP_REDIS_SSL_CONTEXT` | `[]` | TLS connection options for `tls` or `rediss` scheme | +| `WP_REDIS_MANAGER_CAPABILITY` | | The capability a user must have to manage the plugin | @@ -230,11 +231,12 @@ Redis Object Cache has various WP CLI commands, for more information run `wp hel Redis Object Cache has various hooks and the commonly used ones are listed below. -| Filter / Action | Description | -| --------------------------------------- | ------------------------------------------------- | -| `redis_cache_expiration` | Filters the cache expiration for individual keys | -| `redis_cache_validate_dropin` | Filters whether the drop-in is valid | +| Filter / Action | Description | +| --------------------------------------- | ----------- | +| `redis_cache_expiration` | Filters the cache expiration for individual keys | +| `redis_cache_validate_dropin` | Filters whether the drop-in is valid | | `redis_cache_add_non_persistent_groups` | Filters the groups to be marked as non persistent | +| `redis_cache_manager_capability` | Filters the capability a user needs to manage the plugin | ## Footnotes diff --git a/includes/class-plugin.php b/includes/class-plugin.php index 458c8506..eed75162 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -1565,7 +1565,19 @@ public function obscure_url_secrets( $url ) { * @return string */ public function manage_redis_capability() { - return is_multisite() ? 'manage_network_options' : 'manage_options'; + if ( defined( 'WP_REDIS_MANAGER_CAPABILITY' ) && WP_REDIS_MANAGER_CAPABILITY ) { + return WP_REDIS_MANAGER_CAPABILITY; + } + + $capability = is_multisite() ? 'manage_network_options' : 'manage_options'; + + /** + * Filters the capability used to determine if a user can manage Redis. + * + * @since 2.6.0 + * @param string $capability The default capability to determine if the user can manage cache. + */ + return apply_filters( 'redis_cache_manager_capability', $capability ); } /** From be1c893c3a7b50dd18059712d3621c04b30c138f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 11 Jul 2024 17:24:54 -0700 Subject: [PATCH 11/25] remove whitespace [skip ci] --- includes/class-plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-plugin.php b/includes/class-plugin.php index eed75162..9bc95f31 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -1568,7 +1568,7 @@ public function manage_redis_capability() { if ( defined( 'WP_REDIS_MANAGER_CAPABILITY' ) && WP_REDIS_MANAGER_CAPABILITY ) { return WP_REDIS_MANAGER_CAPABILITY; } - + $capability = is_multisite() ? 'manage_network_options' : 'manage_options'; /** From ea49ed057b5b4beb87e04488fe9910362d8e04fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 11 Jul 2024 17:26:19 -0700 Subject: [PATCH 12/25] Update phpstan.dist.neon --- phpstan.dist.neon | 5 ----- 1 file changed, 5 deletions(-) diff --git a/phpstan.dist.neon b/phpstan.dist.neon index b3a071a6..6feeef8a 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -30,11 +30,6 @@ parameters: - includes/object-cache.php ignoreErrors: - # https://github.com/phpredis/phpredis/blob/b193a6d051969a4d5bec33c958e9033f0d983110/redis_cluster.stub.php#L50 - - - message: "#^Class RedisCluster constructor invoked with 1 parameter, 2\\-6 required\\.$#" - count: 1 - path: tests/PHPStan/object-cache.php # Redis Cache implementation differs from core - From 2e27e6ae8f484e405cde02a91ff88ba053724c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 11 Jul 2024 17:29:03 -0700 Subject: [PATCH 13/25] ignore warning --- includes/object-cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index abac5c94..c0067e86 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1607,9 +1607,11 @@ protected function execute_lua_script( $script ) { if ( $this->is_predis() ) { $connection = $this->redis->getConnection(); + if ($connection instanceof Predis\Connection\Replication\ReplicationInterface) { $connection = $connection->getMaster(); } + $timeout = $connection->getParameters()->read_write_timeout ?? ini_get( 'default_socket_timeout' ); stream_set_timeout( $connection->getResource(), $flushTimeout ); } else { @@ -1625,7 +1627,7 @@ protected function execute_lua_script( $script ) { } if ( $this->is_predis() ) { - stream_set_timeout( $connection->getResource(), $timeout ); + stream_set_timeout( $connection->getResource(), $timeout ); // @phpstan-ignore variable.undefined } else { $this->redis->setOption( Redis::OPT_READ_TIMEOUT, $timeout ); } From 862faef8072308de49692acea75fe62c2f1dada8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 11 Jul 2024 17:32:32 -0700 Subject: [PATCH 14/25] Update CHANGELOG.md [skip ci] --- CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e369188..2d97edcc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,12 @@ # Changelog -## Unreleased +## 2.5.3 +- Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant +- Added `redis_cache_manager_capability` filter and `WP_REDIS_MANAGER_CAPABILITY` constant +- Added `WP_REDIS_SSL_CONTEXT` support for PhpRedis cluster connections - Fixed several issues with Predis and cluster/replicated connection -- Fixed rare fatal error in `show_error_and_die()` (one more time) -- Add `redis_cache_manager_capability` filter -- Add `WP_REDIS_MANAGER_CAPABILITY` constant +- Fixed another rare fatal error in `show_error_and_die()` ## 2.5.2 From e07a68f2b28c4dd6c2dc442550e34d7d0242f3e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Thu, 11 Jul 2024 17:52:48 -0700 Subject: [PATCH 15/25] tag v2.5.3 --- includes/object-cache.php | 2 +- readme.txt | 12 ++++++++++-- redis-cache.php | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index c0067e86..f9a5526e 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache Drop-In * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.5.2 + * Version: 2.5.3 * Author: Till Krüss * Author URI: https://objectcache.pro * License: GPLv3 diff --git a/readme.txt b/readme.txt index 044f1722..6b064801 100644 --- a/readme.txt +++ b/readme.txt @@ -3,9 +3,9 @@ Contributors: tillkruess Donate link: https://github.com/sponsors/tillkruss Tags: redis, object cache, caching, performance, relay Requires at least: 4.6 -Tested up to: 6.5 +Tested up to: 6.6 Requires PHP: 7.2 -Stable tag: 2.5.2 +Stable tag: 2.5.3 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -61,6 +61,14 @@ Redis Object Cache has various WP CLI commands, for more information run `wp hel == Changelog == += 2.5.3 = + +- Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant +- Added `redis_cache_manager_capability` filter and `WP_REDIS_MANAGER_CAPABILITY` constant +- Added `WP_REDIS_SSL_CONTEXT` support for PhpRedis cluster connections +- Fixed several issues with Predis and cluster/replicated connection +- Fixed another rare fatal error in `show_error_and_die()` + = 2.5.2 = - Respect `WP_REDIS_FLUSH_TIMEOUT` in Lua flush scripts diff --git a/redis-cache.php b/redis-cache.php index 210509e6..3bfbe11a 100644 --- a/redis-cache.php +++ b/redis-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.5.2 + * Version: 2.5.3 * Text Domain: redis-cache * Domain Path: /languages * Network: true From a4a05848d04d3a65ab797813e51cab51094a478c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Thu, 11 Jul 2024 17:54:00 -0700 Subject: [PATCH 16/25] update pot file --- languages/redis-cache.pot | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/languages/redis-cache.pot b/languages/redis-cache.pot index 517c7469..6a11e640 100644 --- a/languages/redis-cache.pot +++ b/languages/redis-cache.pot @@ -2,14 +2,14 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: Redis Object Cache 2.5.2\n" +"Project-Id-Version: Redis Object Cache 2.5.3\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-04-22T18:55:04+00:00\n" +"POT-Creation-Date: 2024-07-12T00:53:48+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.10.0\n" "X-Domain: redis-cache\n" @@ -308,30 +308,30 @@ msgstr "" msgid "Object cache drop-in could not be updated. Redis server is unreachable: %s" msgstr "" -#: includes/object-cache.php:2974 +#: includes/object-cache.php:2988 msgid "Error establishing a Redis connection" msgstr "" #. translators: %s = Formatted wp-config.php file name. -#: includes/object-cache.php:2981 +#: includes/object-cache.php:2995 msgid "WordPress is unable to establish a connection to Redis. This means that the connection information in your %s file are incorrect, or that the Redis server is not reachable." msgstr "" -#: includes/object-cache.php:2986 +#: includes/object-cache.php:3000 msgid "Is the correct Redis host and port set?" msgstr "" -#: includes/object-cache.php:2987 +#: includes/object-cache.php:3001 msgid "Is the Redis server running?" msgstr "" #. translators: %s = Link to installation instructions. -#: includes/object-cache.php:2992 +#: includes/object-cache.php:3006 msgid "If you need help, please read the installation instructions." msgstr "" #. translators: %1$s = Formatted object-cache.php file name, %2$s = Formatted wp-content directory name. -#: includes/object-cache.php:2999 +#: includes/object-cache.php:3013 msgid "To disable Redis, delete the %1$s file in the %2$s directory." msgstr "" From e3b8fb2dd44d10132da73f52e7fce30af6e2db81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Mon, 29 Jul 2024 11:32:59 -0700 Subject: [PATCH 17/25] avoid double slash --- includes/class-plugin.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/includes/class-plugin.php b/includes/class-plugin.php index 9bc95f31..0fee1938 100644 --- a/includes/class-plugin.php +++ b/includes/class-plugin.php @@ -333,7 +333,12 @@ public function enqueue_admin_styles() { return; } - wp_enqueue_style( 'redis-cache', WP_REDIS_PLUGIN_DIR . '/assets/css/admin.css', [], WP_REDIS_VERSION ); + wp_enqueue_style( + 'redis-cache', + trailingslashit( WP_REDIS_PLUGIN_DIR ) . 'assets/css/admin.css', + [], + WP_REDIS_VERSION + ); } /** From bd85288754e9579794440bef00051dff2c9b2a2a Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Mon, 29 Jul 2024 21:33:23 +0300 Subject: [PATCH 18/25] Fetch Redis server info for sentinel replicated connections (#541) --- CHANGELOG.md | 4 ++++ includes/object-cache.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d97edcc..7b5cb2f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Fixed issue with Predis and `SentinelReplication` connection + ## 2.5.3 - Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant diff --git a/includes/object-cache.php b/includes/object-cache.php index f9a5526e..273583aa 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1147,7 +1147,7 @@ public function fetch_info() { $info = $this->is_predis() ? $this->redis->getClientBy( 'id', $connectionId )->info() : $this->redis->info( $connectionId ); - } else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\MasterSlaveReplication) { + } else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\ReplicationInterface) { $info = $this->redis->getClientBy( 'role' , 'master' )->info(); } else { $info = $this->redis->info(); From 04176f4c0d9c39eaa560768ef0730f2b69de3ba2 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Wed, 7 Aug 2024 23:55:57 +0300 Subject: [PATCH 19/25] Fetch Redis server info for sentinel replicated connections (#544) --- includes/object-cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index 273583aa..1dd1107a 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1148,7 +1148,7 @@ public function fetch_info() { ? $this->redis->getClientBy( 'id', $connectionId )->info() : $this->redis->info( $connectionId ); } else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\ReplicationInterface) { - $info = $this->redis->getClientBy( 'role' , 'master' )->info(); + $info = $this->redis->getMaster()->info(); } else { $info = $this->redis->info(); } From bda9ddd2a3af4b72c6e62606e1137b832d959c3b Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Fri, 13 Sep 2024 18:45:39 +0300 Subject: [PATCH 20/25] Respect WP_REDIS_SCHEME for cluster connection (#546) * Respect WP_REDIS_SCHEME for cluster connection * Do the scheme as part of `build_cluster_connection_array` * Copy logic to object-cache.php --- includes/class-predis.php | 29 +++++++++++++++++++++++------ includes/object-cache.php | 29 +++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 12 deletions(-) diff --git a/includes/class-predis.php b/includes/class-predis.php index e3ccbb06..9fbe687c 100644 --- a/includes/class-predis.php +++ b/includes/class-predis.php @@ -206,13 +206,30 @@ protected function build_cluster_connection_array() { $cluster = array_values( WP_REDIS_CLUSTER ); foreach ( $cluster as $key => $server ) { - $connection_string = parse_url( $server ); + $components = parse_url( $server ); + + if ( ! empty( $components['scheme'] ) ) { + $scheme = $components['scheme']; + } elseif ( defined( 'WP_REDIS_SCHEME' ) ) { + $scheme = WP_REDIS_SCHEME; + } else { + $scheme = null; + } - $cluster[ $key ] = sprintf( - "%s:%s", - $connection_string['host'], - $connection_string['port'] - ); + if ( isset( $scheme ) ) { + $cluster[ $key ] = sprintf( + '%s://%s:%d', + $scheme, + $components['host'], + $components['port'] + ); + } else { + $cluster[ $key ] = sprintf( + '%s:%d', + $components['host'], + $components['port'] + ); + } } return $cluster; diff --git a/includes/object-cache.php b/includes/object-cache.php index 1dd1107a..1c7c47e5 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -3027,13 +3027,30 @@ protected function build_cluster_connection_array() { $cluster = array_values( WP_REDIS_CLUSTER ); foreach ( $cluster as $key => $server ) { - $connection_string = parse_url( $server ); + $components = parse_url( $server ); - $cluster[ $key ] = sprintf( - "%s:%s", - $connection_string['host'], - $connection_string['port'] - ); + if ( ! empty( $components['scheme'] ) ) { + $scheme = $components['scheme']; + } elseif ( defined( 'WP_REDIS_SCHEME' ) ) { + $scheme = WP_REDIS_SCHEME; + } else { + $scheme = null; + } + + if ( isset( $scheme ) ) { + $cluster[ $key ] = sprintf( + '%s://%s:%d', + $scheme, + $components['host'], + $components['port'] + ); + } else { + $cluster[ $key ] = sprintf( + '%s:%d', + $components['host'], + $components['port'] + ); + } } return $cluster; From f76253c6d19f98f5f77b299545c788f2da19a852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Fri, 20 Sep 2024 17:33:02 +0200 Subject: [PATCH 21/25] fix cs in readme.txt (#551) --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 6b064801..0eec94ee 100644 --- a/readme.txt +++ b/readme.txt @@ -65,7 +65,7 @@ Redis Object Cache has various WP CLI commands, for more information run `wp hel - Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant - Added `redis_cache_manager_capability` filter and `WP_REDIS_MANAGER_CAPABILITY` constant -- Added `WP_REDIS_SSL_CONTEXT` support for PhpRedis cluster connections +- Added `WP_REDIS_SSL_CONTEXT` support for PhpRedis cluster connections - Fixed several issues with Predis and cluster/replicated connection - Fixed another rare fatal error in `show_error_and_die()` From b7c7e44fd758240c25c18ac4b0ceff679ac5a9a3 Mon Sep 17 00:00:00 2001 From: Pavlo Yatsukhnenko Date: Tue, 15 Oct 2024 19:56:57 +0300 Subject: [PATCH 22/25] Swith to master before fetching info for predis with replicated connections (#553) --- includes/object-cache.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index 1c7c47e5..66e5c582 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -1147,9 +1147,14 @@ public function fetch_info() { $info = $this->is_predis() ? $this->redis->getClientBy( 'id', $connectionId )->info() : $this->redis->info( $connectionId ); - } else if ($this->is_predis() && $this->redis->getConnection() instanceof Predis\Connection\Replication\ReplicationInterface) { - $info = $this->redis->getMaster()->info(); } else { + if ( $this->is_predis() ) { + $connection = $this->redis->getConnection(); + if ( $connection instanceof Predis\Connection\Replication\ReplicationInterface ) { + $connection->switchToMaster(); + } + } + $info = $this->redis->info(); } From 764c1cce704a020e1b652db0477f32ca460f922e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kr=C3=BCss?= Date: Tue, 15 Oct 2024 09:59:20 -0700 Subject: [PATCH 23/25] Update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5cb2f8..0a288b6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog -## Unreleased +## 2.5.4 +- Respect `WP_REDIS_SCHEME` for Cluster connections - Fixed issue with Predis and `SentinelReplication` connection +- Fixed double-slash in `admin.css` URL ## 2.5.3 From 40ce63c52fbba7d2b55796fec8e4242c54c1ee8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Tue, 15 Oct 2024 10:40:13 -0700 Subject: [PATCH 24/25] tag v2.5.4 --- includes/object-cache.php | 2 +- readme.txt | 8 +++++++- redis-cache.php | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/includes/object-cache.php b/includes/object-cache.php index 66e5c582..b2a631d3 100644 --- a/includes/object-cache.php +++ b/includes/object-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache Drop-In * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.5.3 + * Version: 2.5.4 * Author: Till Krüss * Author URI: https://objectcache.pro * License: GPLv3 diff --git a/readme.txt b/readme.txt index 0eec94ee..6f6fc7e8 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: redis, object cache, caching, performance, relay Requires at least: 4.6 Tested up to: 6.6 Requires PHP: 7.2 -Stable tag: 2.5.3 +Stable tag: 2.5.4 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -61,6 +61,12 @@ Redis Object Cache has various WP CLI commands, for more information run `wp hel == Changelog == += 2.5.4 = + +- Respect `WP_REDIS_SCHEME` for Cluster connections +- Fixed issue with Predis and `SentinelReplication` connection +- Fixed double-slash in `admin.css` URL + = 2.5.3 = - Added `WP_REDIS_DISABLE_GROUP_FLUSH` constant diff --git a/redis-cache.php b/redis-cache.php index 3bfbe11a..5708954e 100644 --- a/redis-cache.php +++ b/redis-cache.php @@ -3,7 +3,7 @@ * Plugin Name: Redis Object Cache * Plugin URI: https://wordpress.org/plugins/redis-cache/ * Description: A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI. - * Version: 2.5.3 + * Version: 2.5.4 * Text Domain: redis-cache * Domain Path: /languages * Network: true From 0cfdb6d0add096c7e0d9028876168c62667ce805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Tue, 15 Oct 2024 10:40:33 -0700 Subject: [PATCH 25/25] update pot file --- languages/redis-cache.pot | 108 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/languages/redis-cache.pot b/languages/redis-cache.pot index 6a11e640..ee377d79 100644 --- a/languages/redis-cache.pot +++ b/languages/redis-cache.pot @@ -2,16 +2,16 @@ # This file is distributed under the GPLv3. msgid "" msgstr "" -"Project-Id-Version: Redis Object Cache 2.5.3\n" +"Project-Id-Version: Redis Object Cache 2.5.4\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/redis-cache\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2024-07-12T00:53:48+00:00\n" +"POT-Creation-Date: 2024-10-15T17:40:24+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.10.0\n" +"X-Generator: WP-CLI 2.11.0\n" "X-Domain: redis-cache\n" #. Plugin Name of the plugin @@ -59,7 +59,7 @@ msgid "Diagnostics" msgstr "" #: includes/class-plugin.php:249 -#: includes/class-plugin.php:764 +#: includes/class-plugin.php:769 #: includes/ui/widget.php:38 msgid "Settings" msgstr "" @@ -69,207 +69,207 @@ msgctxt "verb" msgid "Upgrade to Pro" msgstr "" -#: includes/class-plugin.php:383 +#: includes/class-plugin.php:388 #: includes/ui/tabs/metrics.php:17 #: includes/ui/widget.php:18 msgid "Time" msgstr "" -#: includes/class-plugin.php:384 +#: includes/class-plugin.php:389 #: includes/ui/tabs/metrics.php:22 #: includes/ui/widget.php:23 msgid "Bytes" msgstr "" -#: includes/class-plugin.php:385 +#: includes/class-plugin.php:390 #: includes/ui/tabs/metrics.php:27 #: includes/ui/widget.php:28 msgid "Ratio" msgstr "" -#: includes/class-plugin.php:386 +#: includes/class-plugin.php:391 #: includes/ui/tabs/metrics.php:32 #: includes/ui/widget.php:33 msgid "Calls" msgstr "" -#: includes/class-plugin.php:387 +#: includes/class-plugin.php:392 msgid "Not enough data collected, yet." msgstr "" -#: includes/class-plugin.php:388 +#: includes/class-plugin.php:393 msgid "Enable object cache to collect data." msgstr "" -#: includes/class-plugin.php:534 +#: includes/class-plugin.php:539 #: includes/class-qm-collector.php:77 #: includes/ui/tabs/overview.php:59 msgid "Disabled" msgstr "" -#: includes/class-plugin.php:538 +#: includes/class-plugin.php:543 msgid "Not enabled" msgstr "" -#: includes/class-plugin.php:542 +#: includes/class-plugin.php:547 msgid "Drop-in is outdated" msgstr "" -#: includes/class-plugin.php:546 +#: includes/class-plugin.php:551 msgid "Drop-in is invalid" msgstr "" -#: includes/class-plugin.php:551 +#: includes/class-plugin.php:556 msgid "Connected" msgstr "" -#: includes/class-plugin.php:552 +#: includes/class-plugin.php:557 msgid "Not connected" msgstr "" -#: includes/class-plugin.php:555 +#: includes/class-plugin.php:560 #: includes/ui/tabs/overview.php:266 msgid "Unknown" msgstr "" #. translators: %s = Action link to update the drop-in. -#: includes/class-plugin.php:701 +#: includes/class-plugin.php:706 msgid "The Redis object cache drop-in is outdated. Please update the drop-in." msgstr "" #. translators: %s = Link to settings page. -#: includes/class-plugin.php:708 +#: includes/class-plugin.php:713 msgid "A foreign object cache drop-in was found. To use Redis for object caching, please enable the drop-in." msgstr "" -#: includes/class-plugin.php:735 +#: includes/class-plugin.php:740 #: includes/class-qm-collector.php:34 #: includes/class-qm-output.php:37 msgid "Object Cache" msgstr "" -#: includes/class-plugin.php:756 +#: includes/class-plugin.php:761 #: includes/ui/tabs/overview.php:278 msgid "Flush Cache" msgstr "" #. translators: %s = The status of the Redis connection. -#: includes/class-plugin.php:780 +#: includes/class-plugin.php:785 msgid "Status: %s" msgstr "" #. translators: 1: Hit ratio, 2: Hits, 3: Misses. 4: Human-readable size of cache. -#: includes/class-plugin.php:800 +#: includes/class-plugin.php:805 msgid "(Current page) Hit Ratio: %1$s%%, Hits %2$s, Misses: %3$s, Size: %4$s" msgstr "" -#: includes/class-plugin.php:847 +#: includes/class-plugin.php:852 msgid "Flushing cache..." msgstr "" -#: includes/class-plugin.php:923 +#: includes/class-plugin.php:928 msgid "Object cache flushed." msgstr "" -#: includes/class-plugin.php:929 +#: includes/class-plugin.php:934 msgid "Object cache could not be flushed." msgstr "" -#: includes/class-plugin.php:961 +#: includes/class-plugin.php:966 #: includes/cli/class-commands.php:80 msgid "Object cache enabled." msgstr "" -#: includes/class-plugin.php:967 +#: includes/class-plugin.php:972 #: includes/cli/class-commands.php:82 msgid "Object cache could not be enabled." msgstr "" -#: includes/class-plugin.php:991 +#: includes/class-plugin.php:996 #: includes/cli/class-commands.php:121 msgid "Object cache disabled." msgstr "" -#: includes/class-plugin.php:997 +#: includes/class-plugin.php:1002 #: includes/cli/class-commands.php:123 msgid "Object cache could not be disabled." msgstr "" -#: includes/class-plugin.php:1022 +#: includes/class-plugin.php:1027 #: includes/cli/class-commands.php:162 msgid "Updated object cache drop-in and enabled Redis object cache." msgstr "" -#: includes/class-plugin.php:1028 +#: includes/class-plugin.php:1033 #: includes/cli/class-commands.php:164 msgid "Object cache drop-in could not be updated." msgstr "" #. translators: %s = Action link to update the drop-in. -#: includes/class-plugin.php:1103 +#: includes/class-plugin.php:1108 msgid "The Object Cache Pro plugin appears to be installed and should be used. You can safely uninstall Redis Object Cache." msgstr "" -#: includes/class-plugin.php:1135 +#: includes/class-plugin.php:1140 msgid "Object Cache Pro!" msgstr "" #. translators: %s = Link to the plugin setting screen. -#: includes/class-plugin.php:1138 +#: includes/class-plugin.php:1143 msgid "A business class object cache backend. Truly reliable, highly-optimized and fully customizable, with a dedicated engineer when you most need it. Learn more »" msgstr "" -#: includes/class-plugin.php:1183 +#: includes/class-plugin.php:1188 msgid "Object Cache Pro + WooCommerce = ❤️" msgstr "" #. translators: %s = Link to the plugin's settings screen. -#: includes/class-plugin.php:1186 +#: includes/class-plugin.php:1191 msgid "Object Cache Pro is a business class object cache that’s highly-optimized for WooCommerce to provide true reliability, peace of mind and faster load times for your store. Learn more »" msgstr "" #. translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client. -#: includes/class-plugin.php:1256 +#: includes/class-plugin.php:1261 msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s." msgstr "" -#: includes/class-plugin.php:1371 +#: includes/class-plugin.php:1376 msgid "File modifications are not allowed." msgstr "" -#: includes/class-plugin.php:1375 +#: includes/class-plugin.php:1380 msgid "Could not initialize filesystem." msgstr "" -#: includes/class-plugin.php:1386 +#: includes/class-plugin.php:1391 msgid "Object cache drop-in is not writable." msgstr "" -#: includes/class-plugin.php:1396 +#: includes/class-plugin.php:1401 msgid "Object cache file doesn’t exist." msgstr "" -#: includes/class-plugin.php:1401 +#: includes/class-plugin.php:1406 msgid "Test file exists, but couldn’t be deleted." msgstr "" -#: includes/class-plugin.php:1406 +#: includes/class-plugin.php:1411 msgid "Content directory is not writable." msgstr "" -#: includes/class-plugin.php:1410 +#: includes/class-plugin.php:1415 msgid "Failed to copy test file." msgstr "" -#: includes/class-plugin.php:1414 +#: includes/class-plugin.php:1419 msgid "Copied test file doesn’t exist." msgstr "" -#: includes/class-plugin.php:1420 +#: includes/class-plugin.php:1425 msgid "Couldn’t verify test file contents." msgstr "" -#: includes/class-plugin.php:1424 +#: includes/class-plugin.php:1429 msgid "Copied test file couldn’t be deleted." msgstr "" @@ -308,30 +308,30 @@ msgstr "" msgid "Object cache drop-in could not be updated. Redis server is unreachable: %s" msgstr "" -#: includes/object-cache.php:2988 +#: includes/object-cache.php:2993 msgid "Error establishing a Redis connection" msgstr "" #. translators: %s = Formatted wp-config.php file name. -#: includes/object-cache.php:2995 +#: includes/object-cache.php:3000 msgid "WordPress is unable to establish a connection to Redis. This means that the connection information in your %s file are incorrect, or that the Redis server is not reachable." msgstr "" -#: includes/object-cache.php:3000 +#: includes/object-cache.php:3005 msgid "Is the correct Redis host and port set?" msgstr "" -#: includes/object-cache.php:3001 +#: includes/object-cache.php:3006 msgid "Is the Redis server running?" msgstr "" #. translators: %s = Link to installation instructions. -#: includes/object-cache.php:3006 +#: includes/object-cache.php:3011 msgid "If you need help, please read the installation instructions." msgstr "" #. translators: %1$s = Formatted object-cache.php file name, %2$s = Formatted wp-content directory name. -#: includes/object-cache.php:3013 +#: includes/object-cache.php:3018 msgid "To disable Redis, delete the %1$s file in the %2$s directory." msgstr ""