Version Description
- Fixed a bug in
wp_cache_delete_multiple()
when using Predis - Fixed a bug in
wp_cache_add_multiple()
when cache addition is suspended
Download this release
Release Info
Developer | tillkruess |
Plugin | Redis Object Cache |
Version | 2.0.26 |
Comparing to | |
See all releases |
Code changes from version 2.0.25 to 2.0.26
- includes/class-plugin.php +2 -2
- includes/object-cache.php +5 -3
- languages/redis-cache.pot +33 -32
- readme.txt +10 -5
- redis-cache.php +1 -1
includes/class-plugin.php
CHANGED
@@ -611,15 +611,15 @@ class Plugin {
|
|
611 |
if ( $this->object_cache_dropin_exists() ) {
|
612 |
if ( $this->validate_object_cache_dropin() ) {
|
613 |
if ( $this->object_cache_dropin_outdated() ) {
|
614 |
-
// translators: %s = Action link to update the drop-in.
|
615 |
$message = sprintf(
|
|
|
616 |
__( 'The Redis object cache drop-in is outdated. Please <a href="%s">update the drop-in</a>.', 'redis-cache' ),
|
617 |
$this->action_link( 'update-dropin' )
|
618 |
);
|
619 |
}
|
620 |
} else {
|
621 |
-
// translators: %s = Link to settings page.
|
622 |
$message = sprintf(
|
|
|
623 |
__( 'A foreign object cache drop-in was found. To use Redis for object caching, please <a href="%s">enable the drop-in</a>.', 'redis-cache' ),
|
624 |
esc_url( network_admin_url( $this->page ) )
|
625 |
);
|
611 |
if ( $this->object_cache_dropin_exists() ) {
|
612 |
if ( $this->validate_object_cache_dropin() ) {
|
613 |
if ( $this->object_cache_dropin_outdated() ) {
|
|
|
614 |
$message = sprintf(
|
615 |
+
// translators: %s = Action link to update the drop-in.
|
616 |
__( 'The Redis object cache drop-in is outdated. Please <a href="%s">update the drop-in</a>.', 'redis-cache' ),
|
617 |
$this->action_link( 'update-dropin' )
|
618 |
);
|
619 |
}
|
620 |
} else {
|
|
|
621 |
$message = sprintf(
|
622 |
+
// translators: %s = Link to settings page.
|
623 |
__( 'A foreign object cache drop-in was found. To use Redis for object caching, please <a href="%s">enable the drop-in</a>.', 'redis-cache' ),
|
624 |
esc_url( network_admin_url( $this->page ) )
|
625 |
);
|
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, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
-
* Version: 2.0.
|
7 |
* Author: Till Krüss
|
8 |
* Author URI: https://objectcache.pro
|
9 |
* License: GPLv3
|
@@ -1129,7 +1129,7 @@ class WP_Object_Cache {
|
|
1129 |
*/
|
1130 |
public function add_multiple( array $data, $group = 'default', $expire = 0 ) {
|
1131 |
if ( function_exists( 'wp_suspend_cache_addition' ) && wp_suspend_cache_addition() ) {
|
1132 |
-
return array_combine( $data, array_fill( 0, count( $data ), false ) );
|
1133 |
}
|
1134 |
|
1135 |
$values = [];
|
@@ -1379,9 +1379,11 @@ class WP_Object_Cache {
|
|
1379 |
unset( $this->cache[ $derived_key ] );
|
1380 |
}
|
1381 |
|
|
|
|
|
1382 |
$results = array_map( function ( $response ) {
|
1383 |
return (bool) $this->parse_redis_response( $response );
|
1384 |
-
}, $tx->
|
1385 |
|
1386 |
return array_combine( $keys, $results );
|
1387 |
} catch ( Exception $exception ) {
|
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, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
+
* Version: 2.0.26
|
7 |
* Author: Till Krüss
|
8 |
* Author URI: https://objectcache.pro
|
9 |
* License: GPLv3
|
1129 |
*/
|
1130 |
public function add_multiple( array $data, $group = 'default', $expire = 0 ) {
|
1131 |
if ( function_exists( 'wp_suspend_cache_addition' ) && wp_suspend_cache_addition() ) {
|
1132 |
+
return array_combine( array_keys( $data ), array_fill( 0, count( $data ), false ) );
|
1133 |
}
|
1134 |
|
1135 |
$values = [];
|
1379 |
unset( $this->cache[ $derived_key ] );
|
1380 |
}
|
1381 |
|
1382 |
+
$method = ( $this->redis instanceof Predis\Client ) ? 'execute' : 'exec';
|
1383 |
+
|
1384 |
$results = array_map( function ( $response ) {
|
1385 |
return (bool) $this->parse_redis_response( $response );
|
1386 |
+
}, $tx->{$method}() );
|
1387 |
|
1388 |
return array_combine( $keys, $results );
|
1389 |
} catch ( Exception $exception ) {
|
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.0.
|
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-
|
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"
|
@@ -93,7 +93,6 @@ msgid "Not enough data collected, yet."
|
|
93 |
msgstr ""
|
94 |
|
95 |
#: includes/class-plugin.php:335
|
96 |
-
#: includes/cli/class-commands.php:50
|
97 |
msgid "Enable object cache to collect data."
|
98 |
msgstr ""
|
99 |
|
@@ -123,10 +122,12 @@ msgstr ""
|
|
123 |
msgid "Unknown"
|
124 |
msgstr ""
|
125 |
|
|
|
126 |
#: includes/class-plugin.php:616
|
127 |
msgid "The Redis object cache drop-in is outdated. Please <a href=\"%s\">update the drop-in</a>."
|
128 |
msgstr ""
|
129 |
|
|
|
130 |
#: includes/class-plugin.php:623
|
131 |
msgid "A foreign object cache drop-in was found. To use Redis for object caching, please <a href=\"%s\">enable the drop-in</a>."
|
132 |
msgstr ""
|
@@ -139,88 +140,88 @@ msgstr ""
|
|
139 |
msgid "Object cache could not be flushed."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/class-plugin.php:
|
143 |
-
#: includes/cli/class-commands.php:
|
144 |
msgid "Object cache enabled."
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: includes/class-plugin.php:
|
148 |
-
#: includes/cli/class-commands.php:
|
149 |
msgid "Object cache could not be enabled."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/class-plugin.php:
|
153 |
-
#: includes/cli/class-commands.php:
|
154 |
msgid "Object cache disabled."
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/class-plugin.php:
|
158 |
-
#: includes/cli/class-commands.php:
|
159 |
msgid "Object cache could not be disabled."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/class-plugin.php:
|
163 |
-
#: includes/cli/class-commands.php:
|
164 |
msgid "Updated object cache drop-in and enabled Redis object cache."
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: includes/class-plugin.php:
|
168 |
-
#: includes/cli/class-commands.php:
|
169 |
msgid "Object cache drop-in could not be updated."
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: includes/class-plugin.php:
|
173 |
msgid "Object Cache Pro!"
|
174 |
msgstr ""
|
175 |
|
176 |
#. translators: %s = Link to the plugin setting screen.
|
177 |
-
#: includes/class-plugin.php:
|
178 |
msgid "A <u>business class</u> object cache backend. Truly reliable, highly-optimized and fully customizable, with a <u>dedicated engineer</u> when you most need it. <a href=\"%s\">Learn more »</a>"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/class-plugin.php:
|
182 |
msgid "Object Cache Pro + WooCommerce = ❤️"
|
183 |
msgstr ""
|
184 |
|
185 |
#. translators: %s = Link to the plugin's settings screen.
|
186 |
-
#: includes/class-plugin.php:
|
187 |
msgid "Object Cache Pro is a <u>business class</u> object cache that’s highly-optimized for WooCommerce to provide true reliability, peace of mind and faster load times for your store. <a style=\"color: #bb77ae;\" href=\"%s\">Learn more »</a>"
|
188 |
msgstr ""
|
189 |
|
190 |
#. translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client.
|
191 |
-
#: includes/class-plugin.php:
|
192 |
msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: includes/class-plugin.php:
|
196 |
msgid "Could not initialize filesystem."
|
197 |
msgstr ""
|
198 |
|
199 |
-
#: includes/class-plugin.php:
|
200 |
msgid "Object cache file doesn’t exist."
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: includes/class-plugin.php:
|
204 |
msgid "Test file exists, but couldn’t be deleted."
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: includes/class-plugin.php:
|
208 |
msgid "Content directory is not writable."
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: includes/class-plugin.php:
|
212 |
msgid "Failed to copy test file."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: includes/class-plugin.php:
|
216 |
msgid "Copied test file doesn’t exist."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: includes/class-plugin.php:
|
220 |
msgid "Couldn’t verify test file contents."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: includes/class-plugin.php:
|
224 |
msgid "Copied test file couldn’t be deleted."
|
225 |
msgstr ""
|
226 |
|
@@ -241,16 +242,16 @@ msgstr ""
|
|
241 |
msgid "WordPress is using a foreign object cache drop-in and Redis Object Cache is not being used. Use WP CLI or go to \"Settings -> Redis\" to enable drop-in."
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: includes/cli/class-commands.php:
|
245 |
msgid "Redis object cache already enabled."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: includes/cli/class-commands.php:
|
249 |
-
#: includes/cli/class-commands.php:
|
250 |
msgid "A foreign object cache drop-in was found. To use Redis for object caching, run: `wp redis update-dropin`."
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: includes/cli/class-commands.php:
|
254 |
msgid "No object cache drop-in found."
|
255 |
msgstr ""
|
256 |
|
2 |
# This file is distributed under the GPLv3.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Redis Object Cache 2.0.26\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-05-25T16:50:14+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"
|
93 |
msgstr ""
|
94 |
|
95 |
#: includes/class-plugin.php:335
|
|
|
96 |
msgid "Enable object cache to collect data."
|
97 |
msgstr ""
|
98 |
|
122 |
msgid "Unknown"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#. translators: %s = Action link to update the drop-in.
|
126 |
#: includes/class-plugin.php:616
|
127 |
msgid "The Redis object cache drop-in is outdated. Please <a href=\"%s\">update the drop-in</a>."
|
128 |
msgstr ""
|
129 |
|
130 |
+
#. translators: %s = Link to settings page.
|
131 |
#: includes/class-plugin.php:623
|
132 |
msgid "A foreign object cache drop-in was found. To use Redis for object caching, please <a href=\"%s\">enable the drop-in</a>."
|
133 |
msgstr ""
|
140 |
msgid "Object cache could not be flushed."
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: includes/class-plugin.php:695
|
144 |
+
#: includes/cli/class-commands.php:74
|
145 |
msgid "Object cache enabled."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/class-plugin.php:701
|
149 |
+
#: includes/cli/class-commands.php:76
|
150 |
msgid "Object cache could not be enabled."
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: includes/class-plugin.php:721
|
154 |
+
#: includes/cli/class-commands.php:113
|
155 |
msgid "Object cache disabled."
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/class-plugin.php:727
|
159 |
+
#: includes/cli/class-commands.php:115
|
160 |
msgid "Object cache could not be disabled."
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: includes/class-plugin.php:752
|
164 |
+
#: includes/cli/class-commands.php:147
|
165 |
msgid "Updated object cache drop-in and enabled Redis object cache."
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: includes/class-plugin.php:758
|
169 |
+
#: includes/cli/class-commands.php:149
|
170 |
msgid "Object cache drop-in could not be updated."
|
171 |
msgstr ""
|
172 |
|
173 |
+
#: includes/class-plugin.php:825
|
174 |
msgid "Object Cache Pro!"
|
175 |
msgstr ""
|
176 |
|
177 |
#. translators: %s = Link to the plugin setting screen.
|
178 |
+
#: includes/class-plugin.php:828
|
179 |
msgid "A <u>business class</u> object cache backend. Truly reliable, highly-optimized and fully customizable, with a <u>dedicated engineer</u> when you most need it. <a href=\"%s\">Learn more »</a>"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/class-plugin.php:865
|
183 |
msgid "Object Cache Pro + WooCommerce = ❤️"
|
184 |
msgstr ""
|
185 |
|
186 |
#. translators: %s = Link to the plugin's settings screen.
|
187 |
+
#: includes/class-plugin.php:868
|
188 |
msgid "Object Cache Pro is a <u>business class</u> object cache that’s highly-optimized for WooCommerce to provide true reliability, peace of mind and faster load times for your store. <a style=\"color: #bb77ae;\" href=\"%s\">Learn more »</a>"
|
189 |
msgstr ""
|
190 |
|
191 |
#. translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client.
|
192 |
+
#: includes/class-plugin.php:934
|
193 |
msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: includes/class-plugin.php:991
|
197 |
msgid "Could not initialize filesystem."
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: includes/class-plugin.php:998
|
201 |
msgid "Object cache file doesn’t exist."
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/class-plugin.php:1003
|
205 |
msgid "Test file exists, but couldn’t be deleted."
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: includes/class-plugin.php:1008
|
209 |
msgid "Content directory is not writable."
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/class-plugin.php:1012
|
213 |
msgid "Failed to copy test file."
|
214 |
msgstr ""
|
215 |
|
216 |
+
#: includes/class-plugin.php:1016
|
217 |
msgid "Copied test file doesn’t exist."
|
218 |
msgstr ""
|
219 |
|
220 |
+
#: includes/class-plugin.php:1022
|
221 |
msgid "Couldn’t verify test file contents."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: includes/class-plugin.php:1026
|
225 |
msgid "Copied test file couldn’t be deleted."
|
226 |
msgstr ""
|
227 |
|
242 |
msgid "WordPress is using a foreign object cache drop-in and Redis Object Cache is not being used. Use WP CLI or go to \"Settings -> Redis\" to enable drop-in."
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: includes/cli/class-commands.php:58
|
246 |
msgid "Redis object cache already enabled."
|
247 |
msgstr ""
|
248 |
|
249 |
+
#: includes/cli/class-commands.php:60
|
250 |
+
#: includes/cli/class-commands.php:106
|
251 |
msgid "A foreign object cache drop-in was found. To use Redis for object caching, run: `wp redis update-dropin`."
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: includes/cli/class-commands.php:100
|
255 |
msgid "No object cache drop-in found."
|
256 |
msgstr ""
|
257 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: tillkruess
|
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: redis, predis, phpredis, credis, hhvm, pecl, relay, caching, cache, object cache, performance, replication, clustering, keydb
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to:
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.0.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -16,7 +16,7 @@ A persistent object cache backend powered by Redis. Supports Predis, PhpRedis, C
|
|
16 |
|
17 |
A persistent object cache backend powered by Redis. Supports [Predis](https://github.com/predis/predis/), [PhpRedis (PECL)](https://github.com/phpredis/phpredis), [Relay](https://relaycache.com), [Credis](https://github.com/colinmollenhour/credis), [HHVM](https://github.com/facebook/hhvm/tree/master/hphp/system/php/redis), replication, clustering and [WP-CLI](http://wp-cli.org/).
|
18 |
|
19 |
-
To adjust the connection parameters, prefix cache keys or configure replication/clustering, please see [
|
20 |
|
21 |
= Object Cache Pro =
|
22 |
|
@@ -83,6 +83,11 @@ To see a list of all available WP-CLI commands, please see the [WP CLI commands
|
|
83 |
|
84 |
== Changelog ==
|
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
= 2.0.25 =
|
87 |
|
88 |
- Removed broken `wp_cache_add_multiple()` function
|
@@ -548,6 +553,6 @@ Since Predis isn't maintained any longer, it's highly recommended to switch over
|
|
548 |
|
549 |
== Upgrade Notice ==
|
550 |
|
551 |
-
= 2.0.
|
552 |
|
553 |
-
|
3 |
Donate link: https://github.com/sponsors/tillkruss
|
4 |
Tags: redis, predis, phpredis, credis, hhvm, 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.0.26
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
16 |
|
17 |
A persistent object cache backend powered by Redis. Supports [Predis](https://github.com/predis/predis/), [PhpRedis (PECL)](https://github.com/phpredis/phpredis), [Relay](https://relaycache.com), [Credis](https://github.com/colinmollenhour/credis), [HHVM](https://github.com/facebook/hhvm/tree/master/hphp/system/php/redis), replication, clustering and [WP-CLI](http://wp-cli.org/).
|
18 |
|
19 |
+
To adjust the connection parameters, prefix cache keys or configure replication/clustering, please see [our wiki](https://github.com/rhubarbgroup/redis-cache/wiki).
|
20 |
|
21 |
= Object Cache Pro =
|
22 |
|
83 |
|
84 |
== Changelog ==
|
85 |
|
86 |
+
= 2.0.26 =
|
87 |
+
|
88 |
+
- Fixed a bug in `wp_cache_delete_multiple()` when using Predis
|
89 |
+
- Fixed a bug in `wp_cache_add_multiple()` when cache addition is suspended
|
90 |
+
|
91 |
= 2.0.25 =
|
92 |
|
93 |
- Removed broken `wp_cache_add_multiple()` function
|
553 |
|
554 |
== Upgrade Notice ==
|
555 |
|
556 |
+
= 2.0.26 =
|
557 |
|
558 |
+
WordPress 6.0 compatibility fixes.
|
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, Relay, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
-
* Version: 2.0.
|
7 |
* Text Domain: redis-cache
|
8 |
* Domain Path: /languages
|
9 |
* Network: true
|
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, Credis, HHVM, replication, clustering and WP-CLI.
|
6 |
+
* Version: 2.0.26
|
7 |
* Text Domain: redis-cache
|
8 |
* Domain Path: /languages
|
9 |
* Network: true
|