Redis Object Cache - Version 2.2.1

Version Description

  • Added WordPress 6.1 wp_cache_supports() function
  • Updated Predis to v2.0.3
  • Avoid early microtime() calls in WP_Object_Cache::get()
  • Support Query Monitor's new QM_Data class
  • Throw exception of pipeline returns unexpected results
Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

dependencies/predis/predis/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
  ## Changelog
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ## v2.0.0 (2022-06-08)
4
 
5
  - Dropped support for PHP 7.1 and older
1
  ## Changelog
2
 
3
+ ## v2.0.3 (2022-10-11)
4
+
5
+ - Improved PHP 8.2 support
6
+ - Call `is_resource()` before reading/writing
7
+ - Added partial support for Redis Stream commands
8
+ - Fixed Sentinel authentication issue
9
+
10
+ ## v2.0.2 (2022-09-06)
11
+
12
+ - Fixed PHP 8.2 deprecation notice: Use of "static" in callables
13
+
14
+ ## v2.0.1 (2022-09-04)
15
+
16
+ - Added retry interval to `RedisCluster` with a default of `10ms`
17
+ - Avoid PHP 8.2 warning in `Connection\Parameters`
18
+ - Fixed Sentinel reconnect issue in long-running PHP processes
19
+
20
  ## v2.0.0 (2022-06-08)
21
 
22
  - Dropped support for PHP 7.1 and older
dependencies/predis/predis/README.md CHANGED
@@ -35,6 +35,10 @@ This library can be found on [Packagist](http://packagist.org/packages/predis/pr
35
  management of projects dependencies using [Composer](http://packagist.org/about-composer).
36
  Compressed archives of each release are [available on GitHub](https://github.com/predis/predis/releases).
37
 
 
 
 
 
38
 
39
  ### Loading the library ###
40
 
35
  management of projects dependencies using [Composer](http://packagist.org/about-composer).
36
  Compressed archives of each release are [available on GitHub](https://github.com/predis/predis/releases).
37
 
38
+ ```shell
39
+ composer require predis/predis
40
+ ```
41
+
42
 
43
  ### Loading the library ###
44
 
dependencies/predis/predis/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.3
dependencies/predis/predis/src/Client.php CHANGED
@@ -40,7 +40,7 @@ use Predis\Transaction\MultiExec as MultiExecTransaction;
40
  */
41
  class Client implements ClientInterface, \IteratorAggregate
42
  {
43
- const VERSION = '2.0.0';
44
 
45
  /** @var OptionsInterface */
46
  private $options;
40
  */
41
  class Client implements ClientInterface, \IteratorAggregate
42
  {
43
+ const VERSION = '2.0.3';
44
 
45
  /** @var OptionsInterface */
46
  private $options;
dependencies/predis/predis/src/ClientInterface.php CHANGED
@@ -25,157 +25,163 @@ use Predis\Response\Status;
25
  * and more friendly interface to ease programming which is described in the
26
  * following list of methods:
27
  *
28
- * @method int del(string[]|string $keyOrKeys, string ...$keys = null)
29
- * @method string|null dump(string $key)
30
- * @method int exists(string $key)
31
- * @method int expire(string $key, int $seconds)
32
- * @method int expireat(string $key, int $timestamp)
33
- * @method array keys(string $pattern)
34
- * @method int move(string $key, int $db)
35
- * @method mixed object($subcommand, string $key)
36
- * @method int persist(string $key)
37
- * @method int pexpire(string $key, int $milliseconds)
38
- * @method int pexpireat(string $key, int $timestamp)
39
- * @method int pttl(string $key)
40
- * @method string|null randomkey()
41
- * @method mixed rename(string $key, string $target)
42
- * @method int renamenx(string $key, string $target)
43
- * @method array scan($cursor, array $options = null)
44
- * @method array sort(string $key, array $options = null)
45
- * @method int ttl(string $key)
46
- * @method mixed type(string $key)
47
- * @method int append(string $key, $value)
48
- * @method int bitcount(string $key, $start = null, $end = null)
49
- * @method int bitop($operation, $destkey, $key)
50
- * @method array|null bitfield(string $key, $subcommand, ...$subcommandArg)
51
- * @method int bitpos(string $key, $bit, $start = null, $end = null)
52
- * @method int decr(string $key)
53
- * @method int decrby(string $key, int $decrement)
54
- * @method string|null get(string $key)
55
- * @method int getbit(string $key, $offset)
56
- * @method string getrange(string $key, $start, $end)
57
- * @method string|null getset(string $key, $value)
58
- * @method int incr(string $key)
59
- * @method int incrby(string $key, int $increment)
60
- * @method string incrbyfloat(string $key, int|float $increment)
61
- * @method array mget(string[]|string $keyOrKeys, string ...$keys = null)
62
- * @method mixed mset(array $dictionary)
63
- * @method int msetnx(array $dictionary)
64
- * @method Status psetex(string $key, $milliseconds, $value)
65
- * @method Status set(string $key, $value, $expireResolution = null, $expireTTL = null, $flag = null)
66
- * @method int setbit(string $key, $offset, $value)
67
- * @method Status setex(string $key, $seconds, $value)
68
- * @method int setnx(string $key, $value)
69
- * @method int setrange(string $key, $offset, $value)
70
- * @method int strlen(string $key)
71
- * @method int hdel(string $key, array $fields)
72
- * @method int hexists(string $key, string $field)
73
- * @method string|null hget(string $key, string $field)
74
- * @method array hgetall(string $key)
75
- * @method int hincrby(string $key, string $field, int $increment)
76
- * @method string hincrbyfloat(string $key, string $field, int|float $increment)
77
- * @method array hkeys(string $key)
78
- * @method int hlen(string $key)
79
- * @method array hmget(string $key, array $fields)
80
- * @method mixed hmset(string $key, array $dictionary)
81
- * @method array hscan(string $key, $cursor, array $options = null)
82
- * @method int hset(string $key, string $field, string $value)
83
- * @method int hsetnx(string $key, string $field, string $value)
84
- * @method array hvals(string $key)
85
- * @method int hstrlen(string $key, string $field)
86
- * @method array|null blpop(array|string $keys, int|float $timeout)
87
- * @method array|null brpop(array|string $keys, int|float $timeout)
88
- * @method string|null brpoplpush(string $source, string $destination, int|float $timeout)
89
- * @method string|null lindex(string $key, int $index)
90
- * @method int linsert(string $key, $whence, $pivot, $value)
91
- * @method int llen(string $key)
92
- * @method string|null lpop(string $key)
93
- * @method int lpush(string $key, array $values)
94
- * @method int lpushx(string $key, array $values)
95
- * @method string[] lrange(string $key, int $start, int $stop)
96
- * @method int lrem(string $key, int $count, string $value)
97
- * @method mixed lset(string $key, int $index, string $value)
98
- * @method mixed ltrim(string $key, int $start, int $stop)
99
- * @method string|null rpop(string $key)
100
- * @method string|null rpoplpush(string $source, string $destination)
101
- * @method int rpush(string $key, array $values)
102
- * @method int rpushx(string $key, array $values)
103
- * @method int sadd(string $key, array $members)
104
- * @method int scard(string $key)
105
- * @method string[] sdiff(array|string $keys)
106
- * @method int sdiffstore(string $destination, array|string $keys)
107
- * @method string[] sinter(array|string $keys)
108
- * @method int sinterstore(string $destination, array|string $keys)
109
- * @method int sismember(string $key, string $member)
110
- * @method string[] smembers(string $key)
111
- * @method int smove(string $source, string $destination, string $member)
112
- * @method string|null spop(string $key, int $count = null)
113
- * @method string|null srandmember(string $key, int $count = null)
114
- * @method int srem(string $key, string $member)
115
- * @method array sscan(string $key, int $cursor, array $options = null)
116
- * @method string[] sunion(array|string $keys)
117
- * @method int sunionstore(string $destination, array|string $keys)
118
- * @method int touch(string[]|string $keyOrKeys, string ...$keys = null)
119
- * @method int zadd(string $key, array $membersAndScoresDictionary)
120
- * @method int zcard(string $key)
121
- * @method string zcount(string $key, int|string $min, int|string $max)
122
- * @method string zincrby(string $key, int $increment, string $member)
123
- * @method int zinterstore(string $destination, array|string $keys, array $options = null)
124
- * @method array zpopmin(string $key, int $count = 1)
125
- * @method array zpopmax(string $key, int $count = 1)
126
- * @method array zrange(string $key, int|string $start, int|string $stop, array $options = null)
127
- * @method array zrangebyscore(string $key, int|string $min, int|string $max, array $options = null)
128
- * @method int|null zrank(string $key, string $member)
129
- * @method int zrem(string $key, string ...$member)
130
- * @method int zremrangebyrank(string $key, int|string $start, int|string $stop)
131
- * @method int zremrangebyscore(string $key, int|string $min, int|string $max)
132
- * @method array zrevrange(string $key, int|string $start, int|string $stop, array $options = null)
133
- * @method array zrevrangebyscore(string $key, int|string $max, int|string $min, array $options = null)
134
- * @method int|null zrevrank(string $key, string $member)
135
- * @method int zunionstore(string $destination, array|string $keys, array $options = null)
136
- * @method string|null zscore(string $key, string $member)
137
- * @method array zscan(string $key, int $cursor, array $options = null)
138
- * @method array zrangebylex(string $key, string $start, string $stop, array $options = null)
139
- * @method array zrevrangebylex(string $key, string $start, string $stop, array $options = null)
140
- * @method int zremrangebylex(string $key, string $min, string $max)
141
- * @method int zlexcount(string $key, string $min, string $max)
142
- * @method int pfadd(string $key, array $elements)
143
- * @method mixed pfmerge(string $destinationKey, array|string $sourceKeys)
144
- * @method int pfcount(string[]|string $keyOrKeys, string ...$keys = null)
145
- * @method mixed pubsub($subcommand, $argument)
146
- * @method int publish($channel, $message)
147
- * @method mixed discard()
148
- * @method array|null exec()
149
- * @method mixed multi()
150
- * @method mixed unwatch()
151
- * @method mixed watch(string $key)
152
- * @method mixed eval(string $script, int $numkeys, string ...$keyOrArg = null)
153
- * @method mixed evalsha(string $script, int $numkeys, string ...$keyOrArg = null)
154
- * @method mixed script($subcommand, $argument = null)
155
- * @method mixed auth(string $password)
156
- * @method string echo(string $message)
157
- * @method mixed ping(string $message = null)
158
- * @method mixed select(int $database)
159
- * @method mixed bgrewriteaof()
160
- * @method mixed bgsave()
161
- * @method mixed client($subcommand, $argument = null)
162
- * @method mixed config($subcommand, $argument = null)
163
- * @method int dbsize()
164
- * @method mixed flushall()
165
- * @method mixed flushdb()
166
- * @method array info($section = null)
167
- * @method int lastsave()
168
- * @method mixed save()
169
- * @method mixed slaveof(string $host, int $port)
170
- * @method mixed slowlog($subcommand, $argument = null)
171
- * @method array time()
172
- * @method array command()
173
- * @method int geoadd(string $key, $longitude, $latitude, $member)
174
- * @method array geohash(string $key, array $members)
175
- * @method array geopos(string $key, array $members)
176
- * @method string|null geodist(string $key, $member1, $member2, $unit = null)
177
- * @method array georadius(string $key, $longitude, $latitude, $radius, $unit, array $options = null)
178
- * @method array georadiusbymember(string $key, $member, $radius, $unit, array $options = null)
 
 
 
 
 
 
179
  *
180
  * @author Daniele Alessandri <suppakilla@gmail.com>
181
  */
25
  * and more friendly interface to ease programming which is described in the
26
  * following list of methods:
27
  *
28
+ * @method int del(string[]|string $keyOrKeys, string ...$keys = null)
29
+ * @method string|null dump(string $key)
30
+ * @method int exists(string $key)
31
+ * @method int expire(string $key, int $seconds)
32
+ * @method int expireat(string $key, int $timestamp)
33
+ * @method array keys(string $pattern)
34
+ * @method int move(string $key, int $db)
35
+ * @method mixed object($subcommand, string $key)
36
+ * @method int persist(string $key)
37
+ * @method int pexpire(string $key, int $milliseconds)
38
+ * @method int pexpireat(string $key, int $timestamp)
39
+ * @method int pttl(string $key)
40
+ * @method string|null randomkey()
41
+ * @method mixed rename(string $key, string $target)
42
+ * @method int renamenx(string $key, string $target)
43
+ * @method array scan($cursor, array $options = null)
44
+ * @method array sort(string $key, array $options = null)
45
+ * @method int ttl(string $key)
46
+ * @method mixed type(string $key)
47
+ * @method int append(string $key, $value)
48
+ * @method int bitcount(string $key, $start = null, $end = null)
49
+ * @method int bitop($operation, $destkey, $key)
50
+ * @method array|null bitfield(string $key, $subcommand, ...$subcommandArg)
51
+ * @method int bitpos(string $key, $bit, $start = null, $end = null)
52
+ * @method int decr(string $key)
53
+ * @method int decrby(string $key, int $decrement)
54
+ * @method string|null get(string $key)
55
+ * @method int getbit(string $key, $offset)
56
+ * @method string getrange(string $key, $start, $end)
57
+ * @method string|null getset(string $key, $value)
58
+ * @method int incr(string $key)
59
+ * @method int incrby(string $key, int $increment)
60
+ * @method string incrbyfloat(string $key, int|float $increment)
61
+ * @method array mget(string[]|string $keyOrKeys, string ...$keys = null)
62
+ * @method mixed mset(array $dictionary)
63
+ * @method int msetnx(array $dictionary)
64
+ * @method Status psetex(string $key, $milliseconds, $value)
65
+ * @method Status set(string $key, $value, $expireResolution = null, $expireTTL = null, $flag = null)
66
+ * @method int setbit(string $key, $offset, $value)
67
+ * @method Status setex(string $key, $seconds, $value)
68
+ * @method int setnx(string $key, $value)
69
+ * @method int setrange(string $key, $offset, $value)
70
+ * @method int strlen(string $key)
71
+ * @method int hdel(string $key, array $fields)
72
+ * @method int hexists(string $key, string $field)
73
+ * @method string|null hget(string $key, string $field)
74
+ * @method array hgetall(string $key)
75
+ * @method int hincrby(string $key, string $field, int $increment)
76
+ * @method string hincrbyfloat(string $key, string $field, int|float $increment)
77
+ * @method array hkeys(string $key)
78
+ * @method int hlen(string $key)
79
+ * @method array hmget(string $key, array $fields)
80
+ * @method mixed hmset(string $key, array $dictionary)
81
+ * @method array hscan(string $key, $cursor, array $options = null)
82
+ * @method int hset(string $key, string $field, string $value)
83
+ * @method int hsetnx(string $key, string $field, string $value)
84
+ * @method array hvals(string $key)
85
+ * @method int hstrlen(string $key, string $field)
86
+ * @method array|null blpop(array|string $keys, int|float $timeout)
87
+ * @method array|null brpop(array|string $keys, int|float $timeout)
88
+ * @method string|null brpoplpush(string $source, string $destination, int|float $timeout)
89
+ * @method string|null lindex(string $key, int $index)
90
+ * @method int linsert(string $key, $whence, $pivot, $value)
91
+ * @method int llen(string $key)
92
+ * @method string|null lpop(string $key)
93
+ * @method int lpush(string $key, array $values)
94
+ * @method int lpushx(string $key, array $values)
95
+ * @method string[] lrange(string $key, int $start, int $stop)
96
+ * @method int lrem(string $key, int $count, string $value)
97
+ * @method mixed lset(string $key, int $index, string $value)
98
+ * @method mixed ltrim(string $key, int $start, int $stop)
99
+ * @method string|null rpop(string $key)
100
+ * @method string|null rpoplpush(string $source, string $destination)
101
+ * @method int rpush(string $key, array $values)
102
+ * @method int rpushx(string $key, array $values)
103
+ * @method int sadd(string $key, array $members)
104
+ * @method int scard(string $key)
105
+ * @method string[] sdiff(array|string $keys)
106
+ * @method int sdiffstore(string $destination, array|string $keys)
107
+ * @method string[] sinter(array|string $keys)
108
+ * @method int sinterstore(string $destination, array|string $keys)
109
+ * @method int sismember(string $key, string $member)
110
+ * @method string[] smembers(string $key)
111
+ * @method int smove(string $source, string $destination, string $member)
112
+ * @method string|array|null spop(string $key, int $count = null)
113
+ * @method string|null srandmember(string $key, int $count = null)
114
+ * @method int srem(string $key, array|string $member)
115
+ * @method array sscan(string $key, int $cursor, array $options = null)
116
+ * @method string[] sunion(array|string $keys)
117
+ * @method int sunionstore(string $destination, array|string $keys)
118
+ * @method int touch(string[]|string $keyOrKeys, string ...$keys = null)
119
+ * @method string xadd(string $key, array $dictionary, string $id = '*', array $options = null)
120
+ * @method int xdel(string $key, string ...$id)
121
+ * @method int xlen(string $key)
122
+ * @method array xrevrange(string $key, string $end, string $start, ?int $count = null)
123
+ * @method array xrange(string $key, string $start, string $end, ?int $count = null)
124
+ * @method string xtrim(string $key, array|string $strategy, string $threshold, array $options = null)
125
+ * @method int zadd(string $key, array $membersAndScoresDictionary)
126
+ * @method int zcard(string $key)
127
+ * @method string zcount(string $key, int|string $min, int|string $max)
128
+ * @method string zincrby(string $key, int $increment, string $member)
129
+ * @method int zinterstore(string $destination, array|string $keys, array $options = null)
130
+ * @method array zpopmin(string $key, int $count = 1)
131
+ * @method array zpopmax(string $key, int $count = 1)
132
+ * @method array zrange(string $key, int|string $start, int|string $stop, array $options = null)
133
+ * @method array zrangebyscore(string $key, int|string $min, int|string $max, array $options = null)
134
+ * @method int|null zrank(string $key, string $member)
135
+ * @method int zrem(string $key, string ...$member)
136
+ * @method int zremrangebyrank(string $key, int|string $start, int|string $stop)
137
+ * @method int zremrangebyscore(string $key, int|string $min, int|string $max)
138
+ * @method array zrevrange(string $key, int|string $start, int|string $stop, array $options = null)
139
+ * @method array zrevrangebyscore(string $key, int|string $max, int|string $min, array $options = null)
140
+ * @method int|null zrevrank(string $key, string $member)
141
+ * @method int zunionstore(string $destination, array|string $keys, array $options = null)
142
+ * @method string|null zscore(string $key, string $member)
143
+ * @method array zscan(string $key, int $cursor, array $options = null)
144
+ * @method array zrangebylex(string $key, string $start, string $stop, array $options = null)
145
+ * @method array zrevrangebylex(string $key, string $start, string $stop, array $options = null)
146
+ * @method int zremrangebylex(string $key, string $min, string $max)
147
+ * @method int zlexcount(string $key, string $min, string $max)
148
+ * @method int pfadd(string $key, array $elements)
149
+ * @method mixed pfmerge(string $destinationKey, array|string $sourceKeys)
150
+ * @method int pfcount(string[]|string $keyOrKeys, string ...$keys = null)
151
+ * @method mixed pubsub($subcommand, $argument)
152
+ * @method int publish($channel, $message)
153
+ * @method mixed discard()
154
+ * @method array|null exec()
155
+ * @method mixed multi()
156
+ * @method mixed unwatch()
157
+ * @method mixed watch(string $key)
158
+ * @method mixed eval(string $script, int $numkeys, string ...$keyOrArg = null)
159
+ * @method mixed evalsha(string $script, int $numkeys, string ...$keyOrArg = null)
160
+ * @method mixed script($subcommand, $argument = null)
161
+ * @method mixed auth(string $password)
162
+ * @method string echo(string $message)
163
+ * @method mixed ping(string $message = null)
164
+ * @method mixed select(int $database)
165
+ * @method mixed bgrewriteaof()
166
+ * @method mixed bgsave()
167
+ * @method mixed client($subcommand, $argument = null)
168
+ * @method mixed config($subcommand, $argument = null)
169
+ * @method int dbsize()
170
+ * @method mixed flushall()
171
+ * @method mixed flushdb()
172
+ * @method array info($section = null)
173
+ * @method int lastsave()
174
+ * @method mixed save()
175
+ * @method mixed slaveof(string $host, int $port)
176
+ * @method mixed slowlog($subcommand, $argument = null)
177
+ * @method array time()
178
+ * @method array command()
179
+ * @method int geoadd(string $key, $longitude, $latitude, $member)
180
+ * @method array geohash(string $key, array $members)
181
+ * @method array geopos(string $key, array $members)
182
+ * @method string|null geodist(string $key, $member1, $member2, $unit = null)
183
+ * @method array georadius(string $key, $longitude, $latitude, $radius, $unit, array $options = null)
184
+ * @method array georadiusbymember(string $key, $member, $radius, $unit, array $options = null)
185
  *
186
  * @author Daniele Alessandri <suppakilla@gmail.com>
187
  */
dependencies/predis/predis/src/Command/Processor/KeyPrefixProcessor.php CHANGED
@@ -31,142 +31,154 @@ class KeyPrefixProcessor implements ProcessorInterface
31
  public function __construct($prefix)
32
  {
33
  $this->prefix = $prefix;
34
- $this->commands = array(
 
 
 
 
 
 
 
 
 
 
 
 
35
  /* ---------------- Redis 1.2 ---------------- */
36
- 'EXISTS' => 'static::all',
37
- 'DEL' => 'static::all',
38
- 'TYPE' => 'static::first',
39
- 'KEYS' => 'static::first',
40
- 'RENAME' => 'static::all',
41
- 'RENAMENX' => 'static::all',
42
- 'EXPIRE' => 'static::first',
43
- 'EXPIREAT' => 'static::first',
44
- 'TTL' => 'static::first',
45
- 'MOVE' => 'static::first',
46
- 'SORT' => 'static::sort',
47
- 'DUMP' => 'static::first',
48
- 'RESTORE' => 'static::first',
49
- 'SET' => 'static::first',
50
- 'SETNX' => 'static::first',
51
- 'MSET' => 'static::interleaved',
52
- 'MSETNX' => 'static::interleaved',
53
- 'GET' => 'static::first',
54
- 'MGET' => 'static::all',
55
- 'GETSET' => 'static::first',
56
- 'INCR' => 'static::first',
57
- 'INCRBY' => 'static::first',
58
- 'DECR' => 'static::first',
59
- 'DECRBY' => 'static::first',
60
- 'RPUSH' => 'static::first',
61
- 'LPUSH' => 'static::first',
62
- 'LLEN' => 'static::first',
63
- 'LRANGE' => 'static::first',
64
- 'LTRIM' => 'static::first',
65
- 'LINDEX' => 'static::first',
66
- 'LSET' => 'static::first',
67
- 'LREM' => 'static::first',
68
- 'LPOP' => 'static::first',
69
- 'RPOP' => 'static::first',
70
- 'RPOPLPUSH' => 'static::all',
71
- 'SADD' => 'static::first',
72
- 'SREM' => 'static::first',
73
- 'SPOP' => 'static::first',
74
- 'SMOVE' => 'static::skipLast',
75
- 'SCARD' => 'static::first',
76
- 'SISMEMBER' => 'static::first',
77
- 'SINTER' => 'static::all',
78
- 'SINTERSTORE' => 'static::all',
79
- 'SUNION' => 'static::all',
80
- 'SUNIONSTORE' => 'static::all',
81
- 'SDIFF' => 'static::all',
82
- 'SDIFFSTORE' => 'static::all',
83
- 'SMEMBERS' => 'static::first',
84
- 'SRANDMEMBER' => 'static::first',
85
- 'ZADD' => 'static::first',
86
- 'ZINCRBY' => 'static::first',
87
- 'ZREM' => 'static::first',
88
- 'ZRANGE' => 'static::first',
89
- 'ZREVRANGE' => 'static::first',
90
- 'ZRANGEBYSCORE' => 'static::first',
91
- 'ZCARD' => 'static::first',
92
- 'ZSCORE' => 'static::first',
93
- 'ZREMRANGEBYSCORE' => 'static::first',
94
  /* ---------------- Redis 2.0 ---------------- */
95
- 'SETEX' => 'static::first',
96
- 'APPEND' => 'static::first',
97
- 'SUBSTR' => 'static::first',
98
- 'BLPOP' => 'static::skipLast',
99
- 'BRPOP' => 'static::skipLast',
100
- 'ZUNIONSTORE' => 'static::zsetStore',
101
- 'ZINTERSTORE' => 'static::zsetStore',
102
- 'ZCOUNT' => 'static::first',
103
- 'ZRANK' => 'static::first',
104
- 'ZREVRANK' => 'static::first',
105
- 'ZREMRANGEBYRANK' => 'static::first',
106
- 'HSET' => 'static::first',
107
- 'HSETNX' => 'static::first',
108
- 'HMSET' => 'static::first',
109
- 'HINCRBY' => 'static::first',
110
- 'HGET' => 'static::first',
111
- 'HMGET' => 'static::first',
112
- 'HDEL' => 'static::first',
113
- 'HEXISTS' => 'static::first',
114
- 'HLEN' => 'static::first',
115
- 'HKEYS' => 'static::first',
116
- 'HVALS' => 'static::first',
117
- 'HGETALL' => 'static::first',
118
- 'SUBSCRIBE' => 'static::all',
119
- 'UNSUBSCRIBE' => 'static::all',
120
- 'PSUBSCRIBE' => 'static::all',
121
- 'PUNSUBSCRIBE' => 'static::all',
122
- 'PUBLISH' => 'static::first',
123
  /* ---------------- Redis 2.2 ---------------- */
124
- 'PERSIST' => 'static::first',
125
- 'STRLEN' => 'static::first',
126
- 'SETRANGE' => 'static::first',
127
- 'GETRANGE' => 'static::first',
128
- 'SETBIT' => 'static::first',
129
- 'GETBIT' => 'static::first',
130
- 'RPUSHX' => 'static::first',
131
- 'LPUSHX' => 'static::first',
132
- 'LINSERT' => 'static::first',
133
- 'BRPOPLPUSH' => 'static::skipLast',
134
- 'ZREVRANGEBYSCORE' => 'static::first',
135
- 'WATCH' => 'static::all',
136
  /* ---------------- Redis 2.6 ---------------- */
137
- 'PTTL' => 'static::first',
138
- 'PEXPIRE' => 'static::first',
139
- 'PEXPIREAT' => 'static::first',
140
- 'PSETEX' => 'static::first',
141
- 'INCRBYFLOAT' => 'static::first',
142
- 'BITOP' => 'static::skipFirst',
143
- 'BITCOUNT' => 'static::first',
144
- 'HINCRBYFLOAT' => 'static::first',
145
- 'EVAL' => 'static::evalKeys',
146
- 'EVALSHA' => 'static::evalKeys',
147
- 'MIGRATE' => 'static::migrate',
148
  /* ---------------- Redis 2.8 ---------------- */
149
- 'SSCAN' => 'static::first',
150
- 'ZSCAN' => 'static::first',
151
- 'HSCAN' => 'static::first',
152
- 'PFADD' => 'static::first',
153
- 'PFCOUNT' => 'static::all',
154
- 'PFMERGE' => 'static::all',
155
- 'ZLEXCOUNT' => 'static::first',
156
- 'ZRANGEBYLEX' => 'static::first',
157
- 'ZREMRANGEBYLEX' => 'static::first',
158
- 'ZREVRANGEBYLEX' => 'static::first',
159
- 'BITPOS' => 'static::first',
160
  /* ---------------- Redis 3.2 ---------------- */
161
- 'HSTRLEN' => 'static::first',
162
- 'BITFIELD' => 'static::first',
163
- 'GEOADD' => 'static::first',
164
- 'GEOHASH' => 'static::first',
165
- 'GEOPOS' => 'static::first',
166
- 'GEODIST' => 'static::first',
167
- 'GEORADIUS' => 'static::georadius',
168
- 'GEORADIUSBYMEMBER' => 'static::georadius',
169
- );
170
  }
171
 
172
  /**
@@ -197,7 +209,7 @@ class KeyPrefixProcessor implements ProcessorInterface
197
  if ($command instanceof PrefixableCommandInterface) {
198
  $command->prefixKeys($this->prefix);
199
  } elseif (isset($this->commands[$commandID = strtoupper($command->getId())])) {
200
- call_user_func($this->commands[$commandID], $command, $this->prefix);
201
  }
202
  }
203
 
31
  public function __construct($prefix)
32
  {
33
  $this->prefix = $prefix;
34
+
35
+ $prefixFirst = static::class . '::first';
36
+ $prefixAll = static::class . '::all';
37
+ $prefixInterleaved = static::class . '::interleaved';
38
+ $prefixSkipFirst = static::class . '::skipFirst';
39
+ $prefixSkipLast = static::class . '::skipLast';
40
+ $prefixSort = static::class . '::sort';
41
+ $prefixEvalKeys = static::class . '::evalKeys';
42
+ $prefixZsetStore = static::class . '::zsetStore';
43
+ $prefixMigrate = static::class . '::migrate';
44
+ $prefixGeoradius = static::class . '::georadius';
45
+
46
+ $this->commands = [
47
  /* ---------------- Redis 1.2 ---------------- */
48
+ 'EXISTS' => $prefixAll,
49
+ 'DEL' => $prefixAll,
50
+ 'TYPE' => $prefixFirst,
51
+ 'KEYS' => $prefixFirst,
52
+ 'RENAME' => $prefixAll,
53
+ 'RENAMENX' => $prefixAll,
54
+ 'EXPIRE' => $prefixFirst,
55
+ 'EXPIREAT' => $prefixFirst,
56
+ 'TTL' => $prefixFirst,
57
+ 'MOVE' => $prefixFirst,
58
+ 'SORT' => $prefixSort,
59
+ 'DUMP' => $prefixFirst,
60
+ 'RESTORE' => $prefixFirst,
61
+ 'SET' => $prefixFirst,
62
+ 'SETNX' => $prefixFirst,
63
+ 'MSET' => $prefixInterleaved,
64
+ 'MSETNX' => $prefixInterleaved,
65
+ 'GET' => $prefixFirst,
66
+ 'MGET' => $prefixAll,
67
+ 'GETSET' => $prefixFirst,
68
+ 'INCR' => $prefixFirst,
69
+ 'INCRBY' => $prefixFirst,
70
+ 'DECR' => $prefixFirst,
71
+ 'DECRBY' => $prefixFirst,
72
+ 'RPUSH' => $prefixFirst,
73
+ 'LPUSH' => $prefixFirst,
74
+ 'LLEN' => $prefixFirst,
75
+ 'LRANGE' => $prefixFirst,
76
+ 'LTRIM' => $prefixFirst,
77
+ 'LINDEX' => $prefixFirst,
78
+ 'LSET' => $prefixFirst,
79
+ 'LREM' => $prefixFirst,
80
+ 'LPOP' => $prefixFirst,
81
+ 'RPOP' => $prefixFirst,
82
+ 'RPOPLPUSH' => $prefixAll,
83
+ 'SADD' => $prefixFirst,
84
+ 'SREM' => $prefixFirst,
85
+ 'SPOP' => $prefixFirst,
86
+ 'SMOVE' => $prefixSkipLast,
87
+ 'SCARD' => $prefixFirst,
88
+ 'SISMEMBER' => $prefixFirst,
89
+ 'SINTER' => $prefixAll,
90
+ 'SINTERSTORE' => $prefixAll,
91
+ 'SUNION' => $prefixAll,
92
+ 'SUNIONSTORE' => $prefixAll,
93
+ 'SDIFF' => $prefixAll,
94
+ 'SDIFFSTORE' => $prefixAll,
95
+ 'SMEMBERS' => $prefixFirst,
96
+ 'SRANDMEMBER' => $prefixFirst,
97
+ 'ZADD' => $prefixFirst,
98
+ 'ZINCRBY' => $prefixFirst,
99
+ 'ZREM' => $prefixFirst,
100
+ 'ZRANGE' => $prefixFirst,
101
+ 'ZREVRANGE' => $prefixFirst,
102
+ 'ZRANGEBYSCORE' => $prefixFirst,
103
+ 'ZCARD' => $prefixFirst,
104
+ 'ZSCORE' => $prefixFirst,
105
+ 'ZREMRANGEBYSCORE' => $prefixFirst,
106
  /* ---------------- Redis 2.0 ---------------- */
107
+ 'SETEX' => $prefixFirst,
108
+ 'APPEND' => $prefixFirst,
109
+ 'SUBSTR' => $prefixFirst,
110
+ 'BLPOP' => $prefixSkipLast,
111
+ 'BRPOP' => $prefixSkipLast,
112
+ 'ZUNIONSTORE' => $prefixZsetStore,
113
+ 'ZINTERSTORE' => $prefixZsetStore,
114
+ 'ZCOUNT' => $prefixFirst,
115
+ 'ZRANK' => $prefixFirst,
116
+ 'ZREVRANK' => $prefixFirst,
117
+ 'ZREMRANGEBYRANK' => $prefixFirst,
118
+ 'HSET' => $prefixFirst,
119
+ 'HSETNX' => $prefixFirst,
120
+ 'HMSET' => $prefixFirst,
121
+ 'HINCRBY' => $prefixFirst,
122
+ 'HGET' => $prefixFirst,
123
+ 'HMGET' => $prefixFirst,
124
+ 'HDEL' => $prefixFirst,
125
+ 'HEXISTS' => $prefixFirst,
126
+ 'HLEN' => $prefixFirst,
127
+ 'HKEYS' => $prefixFirst,
128
+ 'HVALS' => $prefixFirst,
129
+ 'HGETALL' => $prefixFirst,
130
+ 'SUBSCRIBE' => $prefixAll,
131
+ 'UNSUBSCRIBE' => $prefixAll,
132
+ 'PSUBSCRIBE' => $prefixAll,
133
+ 'PUNSUBSCRIBE' => $prefixAll,
134
+ 'PUBLISH' => $prefixFirst,
135
  /* ---------------- Redis 2.2 ---------------- */
136
+ 'PERSIST' => $prefixFirst,
137
+ 'STRLEN' => $prefixFirst,
138
+ 'SETRANGE' => $prefixFirst,
139
+ 'GETRANGE' => $prefixFirst,
140
+ 'SETBIT' => $prefixFirst,
141
+ 'GETBIT' => $prefixFirst,
142
+ 'RPUSHX' => $prefixFirst,
143
+ 'LPUSHX' => $prefixFirst,
144
+ 'LINSERT' => $prefixFirst,
145
+ 'BRPOPLPUSH' => $prefixSkipLast,
146
+ 'ZREVRANGEBYSCORE' => $prefixFirst,
147
+ 'WATCH' => $prefixAll,
148
  /* ---------------- Redis 2.6 ---------------- */
149
+ 'PTTL' => $prefixFirst,
150
+ 'PEXPIRE' => $prefixFirst,
151
+ 'PEXPIREAT' => $prefixFirst,
152
+ 'PSETEX' => $prefixFirst,
153
+ 'INCRBYFLOAT' => $prefixFirst,
154
+ 'BITOP' => $prefixSkipFirst,
155
+ 'BITCOUNT' => $prefixFirst,
156
+ 'HINCRBYFLOAT' => $prefixFirst,
157
+ 'EVAL' => $prefixEvalKeys,
158
+ 'EVALSHA' => $prefixEvalKeys,
159
+ 'MIGRATE' => $prefixMigrate,
160
  /* ---------------- Redis 2.8 ---------------- */
161
+ 'SSCAN' => $prefixFirst,
162
+ 'ZSCAN' => $prefixFirst,
163
+ 'HSCAN' => $prefixFirst,
164
+ 'PFADD' => $prefixFirst,
165
+ 'PFCOUNT' => $prefixAll,
166
+ 'PFMERGE' => $prefixAll,
167
+ 'ZLEXCOUNT' => $prefixFirst,
168
+ 'ZRANGEBYLEX' => $prefixFirst,
169
+ 'ZREMRANGEBYLEX' => $prefixFirst,
170
+ 'ZREVRANGEBYLEX' => $prefixFirst,
171
+ 'BITPOS' => $prefixFirst,
172
  /* ---------------- Redis 3.2 ---------------- */
173
+ 'HSTRLEN' => $prefixFirst,
174
+ 'BITFIELD' => $prefixFirst,
175
+ 'GEOADD' => $prefixFirst,
176
+ 'GEOHASH' => $prefixFirst,
177
+ 'GEOPOS' => $prefixFirst,
178
+ 'GEODIST' => $prefixFirst,
179
+ 'GEORADIUS' => $prefixGeoradius,
180
+ 'GEORADIUSBYMEMBER' => $prefixGeoradius,
181
+ ];
182
  }
183
 
184
  /**
209
  if ($command instanceof PrefixableCommandInterface) {
210
  $command->prefixKeys($this->prefix);
211
  } elseif (isset($this->commands[$commandID = strtoupper($command->getId())])) {
212
+ $this->commands[$commandID]($command, $this->prefix);
213
  }
214
  }
215
 
dependencies/predis/predis/src/Command/Redis/XADD.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ use Predis\Command\Command as RedisCommand;
15
+
16
+ /**
17
+ * @link http://redis.io/commands/xadd
18
+ *
19
+ * @author Daniele Alessandri <suppakilla@gmail.com>
20
+ */
21
+ class XADD extends RedisCommand
22
+ {
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function getId()
27
+ {
28
+ return 'XADD';
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function setArguments(array $arguments)
35
+ {
36
+ $args = array();
37
+
38
+ $args[] = $arguments[0];
39
+ $options = $arguments[3] ?? [];
40
+
41
+ if (isset($options['nomkstream']) && $options['nomkstream']) {
42
+ $args[] = 'NOMKSTREAM';
43
+ }
44
+
45
+ if (isset($options['trim']) && is_array($options['trim'])) {
46
+ array_push($args, ...$options['trim']);
47
+
48
+ if (isset($options['limit'])) {
49
+ $args[] = 'LIMIT';
50
+ $args[] = $options['limit'];
51
+ }
52
+ }
53
+
54
+ // ID, default to * to let Redis set it
55
+ $args[] = $arguments[2] ?? '*';
56
+ if (isset($arguments[1]) && is_array($arguments[1])) {
57
+ foreach ($arguments[1] as $key => $val) {
58
+ $args[] = $key;
59
+ $args[] = $val;
60
+ }
61
+ }
62
+
63
+ parent::setArguments($args);
64
+ }
65
+ }
dependencies/predis/predis/src/Command/Redis/XDEL.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ use Predis\Command\Command as RedisCommand;
15
+
16
+ /**
17
+ * @link http://redis.io/commands/xdel
18
+ *
19
+ * @author Daniele Alessandri <suppakilla@gmail.com>
20
+ */
21
+ class XDEL extends RedisCommand
22
+ {
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function getId()
27
+ {
28
+ return 'XDEL';
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function setArguments(array $arguments)
35
+ {
36
+ $arguments = self::normalizeVariadic($arguments);
37
+
38
+ parent::setArguments($arguments);
39
+ }
40
+ }
dependencies/predis/predis/src/Command/Redis/XLEN.php ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ use Predis\Command\Command as RedisCommand;
15
+
16
+ /**
17
+ * @link http://redis.io/commands/xlen
18
+ *
19
+ * @author Daniele Alessandri <suppakilla@gmail.com>
20
+ */
21
+ class XLEN extends RedisCommand
22
+ {
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function getId()
27
+ {
28
+ return 'XLEN';
29
+ }
30
+ }
dependencies/predis/predis/src/Command/Redis/XRANGE.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ use Predis\Command\Command as RedisCommand;
15
+
16
+ /**
17
+ * @link http://redis.io/commands/xrange
18
+ *
19
+ * @author Daniele Alessandri <suppakilla@gmail.com>
20
+ */
21
+ class XRANGE extends RedisCommand
22
+ {
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function getId()
27
+ {
28
+ return 'XRANGE';
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function setArguments(array $arguments)
35
+ {
36
+ if (count($arguments) === 4) {
37
+ $arguments[] = $arguments[3];
38
+ $arguments[3] = 'COUNT';
39
+ }
40
+
41
+ parent::setArguments($arguments);
42
+ }
43
+
44
+ /**
45
+ * {@inheritdoc}
46
+ */
47
+ public function parseResponse($data)
48
+ {
49
+ $result = array();
50
+ foreach ($data as $entry) {
51
+ $processed = array();
52
+ $count = count($entry[1]);
53
+
54
+ for ($i = 0; $i < $count; ++$i) {
55
+ $processed[$entry[1][$i]] = $entry[1][++$i];
56
+ }
57
+
58
+ $result[$entry[0]] = $processed;
59
+ }
60
+
61
+ return $result;
62
+ }
63
+ }
dependencies/predis/predis/src/Command/Redis/XREVRANGE.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ /**
15
+ * @link http://redis.io/commands/xrevrange
16
+ *
17
+ * @author Daniele Alessandri <suppakilla@gmail.com>
18
+ */
19
+ class XREVRANGE extends XRANGE
20
+ {
21
+ /**
22
+ * {@inheritdoc}
23
+ */
24
+ public function getId()
25
+ {
26
+ return 'XREVRANGE';
27
+ }
28
+ }
dependencies/predis/predis/src/Command/Redis/XTRIM.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Predis package.
5
+ *
6
+ * (c) Daniele Alessandri <suppakilla@gmail.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Predis\Command\Redis;
13
+
14
+ use Predis\Command\Command as RedisCommand;
15
+
16
+ /**
17
+ * @link http://redis.io/commands/xtrim
18
+ *
19
+ * @author Daniele Alessandri <suppakilla@gmail.com>
20
+ */
21
+ class XTRIM extends RedisCommand
22
+ {
23
+ /**
24
+ * {@inheritdoc}
25
+ */
26
+ public function getId()
27
+ {
28
+ return 'XTRIM';
29
+ }
30
+
31
+ /**
32
+ * {@inheritdoc}
33
+ */
34
+ public function setArguments(array $arguments)
35
+ {
36
+ $args = [];
37
+ $options = $arguments[3] ?? [];
38
+
39
+ $args[] = $arguments[0];
40
+ // Either e.g. 'MAXLEN' or ['MAXLEN', '~']
41
+ if (is_array($arguments[1])) {
42
+ array_push($args, ...$arguments[1]);
43
+ } else {
44
+ $args[] = $arguments[1];
45
+ }
46
+
47
+ $args[] = $arguments[2];
48
+ if (isset($options['limit'])) {
49
+ $args[] = 'LIMIT';
50
+ $args[] = $options['limit'];
51
+ }
52
+
53
+ parent::setArguments($args);
54
+ }
55
+ }
dependencies/predis/predis/src/Connection/Cluster/RedisCluster.php CHANGED
@@ -22,6 +22,8 @@ use Predis\Connection\FactoryInterface;
22
  use Predis\Connection\NodeConnectionInterface;
23
  use Predis\NotSupportedException;
24
  use Predis\Response\ErrorInterface as ErrorResponseInterface;
 
 
25
 
26
  /**
27
  * Abstraction for a Redis-backed cluster of nodes (Redis >= 3.0.0).
@@ -54,6 +56,7 @@ class RedisCluster implements ClusterInterface, \IteratorAggregate, \Countable
54
  private $strategy;
55
  private $connections;
56
  private $retryLimit = 5;
 
57
 
58
  /**
59
  * @param FactoryInterface $connections Optional connection factory.
@@ -82,6 +85,26 @@ class RedisCluster implements ClusterInterface, \IteratorAggregate, \Countable
82
  $this->retryLimit = (int) $retry;
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  /**
86
  * {@inheritdoc}
87
  */
@@ -207,6 +230,7 @@ class RedisCluster implements ClusterInterface, \IteratorAggregate, \Countable
207
  private function queryClusterNodeForSlotMap(NodeConnectionInterface $connection)
208
  {
209
  $retries = 0;
 
210
  $command = RawCommand::create('CLUSTER', 'SLOTS');
211
 
212
  RETRY_COMMAND: {
@@ -226,7 +250,10 @@ class RedisCluster implements ClusterInterface, \IteratorAggregate, \Countable
226
  throw new ClientException('No connections left in the pool for `CLUSTER SLOTS`');
227
  }
228
 
 
 
229
  ++$retries;
 
230
  goto RETRY_COMMAND;
231
  }
232
  }
@@ -482,24 +509,40 @@ class RedisCluster implements ClusterInterface, \IteratorAggregate, \Countable
482
  */
483
  private function retryCommandOnFailure(CommandInterface $command, $method)
484
  {
485
- $failure = false;
 
486
 
487
  RETRY_COMMAND: {
488
  try {
489
  $response = $this->getConnectionByCommand($command)->$method($command);
490
- } catch (ConnectionException $exception) {
491
- $connection = $exception->getConnection();
492
- $connection->disconnect();
493
 
494
- $this->remove($connection);
 
495
 
496
- if ($failure) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
497
  throw $exception;
498
  } elseif ($this->useClusterSlots) {
499
  $this->askSlotMap();
500
  }
501
 
502
- $failure = true;
503
 
504
  goto RETRY_COMMAND;
505
  }
22
  use Predis\Connection\NodeConnectionInterface;
23
  use Predis\NotSupportedException;
24
  use Predis\Response\ErrorInterface as ErrorResponseInterface;
25
+ use Predis\Response\ServerException;
26
+ use Predis\Response\Error as ErrorResponse;
27
 
28
  /**
29
  * Abstraction for a Redis-backed cluster of nodes (Redis >= 3.0.0).
56
  private $strategy;
57
  private $connections;
58
  private $retryLimit = 5;
59
+ private $retryInterval = 10;
60
 
61
  /**
62
  * @param FactoryInterface $connections Optional connection factory.
85
  $this->retryLimit = (int) $retry;
86
  }
87
 
88
+ /**
89
+ * Sets the initial retry interval (milliseconds).
90
+ *
91
+ * @param int $retryInterval Milliseconds between retries.
92
+ */
93
+ public function setRetryInterval($retryInterval)
94
+ {
95
+ $this->retryInterval = (int) $retryInterval;
96
+ }
97
+
98
+ /**
99
+ * Returns the retry interval (milliseconds).
100
+ *
101
+ * @return int Milliseconds between retries.
102
+ */
103
+ public function getRetryInterval()
104
+ {
105
+ return (int) $this->retryInterval;
106
+ }
107
+
108
  /**
109
  * {@inheritdoc}
110
  */
230
  private function queryClusterNodeForSlotMap(NodeConnectionInterface $connection)
231
  {
232
  $retries = 0;
233
+ $retryAfter = $this->retryInterval;
234
  $command = RawCommand::create('CLUSTER', 'SLOTS');
235
 
236
  RETRY_COMMAND: {
250
  throw new ClientException('No connections left in the pool for `CLUSTER SLOTS`');
251
  }
252
 
253
+ usleep($retryAfter * 1000);
254
+ $retryAfter = $retryAfter * 2;
255
  ++$retries;
256
+
257
  goto RETRY_COMMAND;
258
  }
259
  }
509
  */
510
  private function retryCommandOnFailure(CommandInterface $command, $method)
511
  {
512
+ $retries = 0;
513
+ $retryAfter = $this->retryInterval;
514
 
515
  RETRY_COMMAND: {
516
  try {
517
  $response = $this->getConnectionByCommand($command)->$method($command);
 
 
 
518
 
519
+ if ($response instanceof ErrorResponse) {
520
+ $message = $response->getMessage();
521
 
522
+ if (strpos($message, 'CLUSTERDOWN') !== false) {
523
+ throw new ServerException($message);
524
+ }
525
+ }
526
+ } catch (\Throwable $exception) {
527
+ usleep($retryAfter * 1000);
528
+ $retryAfter = $retryAfter * 2;
529
+
530
+ if ($exception instanceof ConnectionException) {
531
+ $connection = $exception->getConnection();
532
+
533
+ if ($connection) {
534
+ $connection->disconnect();
535
+ $this->remove($connection);
536
+ }
537
+ }
538
+
539
+ if ($retries === $this->retryLimit) {
540
  throw $exception;
541
  } elseif ($this->useClusterSlots) {
542
  $this->askSlotMap();
543
  }
544
 
545
+ ++$retries;
546
 
547
  goto RETRY_COMMAND;
548
  }
dependencies/predis/predis/src/Connection/Parameters.php CHANGED
@@ -26,6 +26,14 @@ class Parameters implements ParametersInterface
26
  'port' => 6379,
27
  );
28
 
 
 
 
 
 
 
 
 
29
  /**
30
  * @param array $parameters Named array of connection parameters.
31
  */
26
  'port' => 6379,
27
  );
28
 
29
+ /**
30
+ * Set of connection paramaters already filtered
31
+ * for NULL or 0-length string values.
32
+ *
33
+ * @var array
34
+ */
35
+ protected $parameters;
36
+
37
  /**
38
  * @param array $parameters Named array of connection parameters.
39
  */
dependencies/predis/predis/src/Connection/Replication/SentinelReplication.php CHANGED
@@ -70,6 +70,11 @@ class SentinelReplication implements ReplicationInterface
70
  */
71
  protected $sentinels = array();
72
 
 
 
 
 
 
73
  /**
74
  * @var NodeConnectionInterface
75
  */
@@ -264,6 +269,12 @@ class SentinelReplication implements ReplicationInterface
264
  $parameters['database'] = null;
265
  $parameters['username'] = null;
266
 
 
 
 
 
 
 
267
  if (!isset($parameters['timeout'])) {
268
  $parameters['timeout'] = $this->sentinelTimeout;
269
  }
@@ -282,11 +293,13 @@ class SentinelReplication implements ReplicationInterface
282
  public function getSentinelConnection()
283
  {
284
  if (!$this->sentinelConnection) {
285
- if (!$this->sentinels) {
 
286
  throw new \Predis\ClientException('No sentinel server available for autodiscovery.');
287
  }
288
 
289
- $sentinel = array_shift($this->sentinels);
 
290
  $this->sentinelConnection = $this->createSentinelConnection($sentinel);
291
  }
292
 
@@ -307,6 +320,7 @@ class SentinelReplication implements ReplicationInterface
307
  );
308
 
309
  $this->sentinels = array();
 
310
  // NOTE: sentinel server does not return itself, so we add it back.
311
  $this->sentinels[] = $sentinel->getParameters()->toArray();
312
 
70
  */
71
  protected $sentinels = array();
72
 
73
+ /**
74
+ * @var int
75
+ */
76
+ protected $sentinelIndex = 0;
77
+
78
  /**
79
  * @var NodeConnectionInterface
80
  */
269
  $parameters['database'] = null;
270
  $parameters['username'] = null;
271
 
272
+ // don't leak password from between configurations
273
+ // https://github.com/predis/predis/pull/807/#discussion_r985764770
274
+ if (! isset($parameters['password'])) {
275
+ $parameters['password'] = null;
276
+ }
277
+
278
  if (!isset($parameters['timeout'])) {
279
  $parameters['timeout'] = $this->sentinelTimeout;
280
  }
293
  public function getSentinelConnection()
294
  {
295
  if (!$this->sentinelConnection) {
296
+ if ($this->sentinelIndex >= count($this->sentinels)) {
297
+ $this->sentinelIndex = 0;
298
  throw new \Predis\ClientException('No sentinel server available for autodiscovery.');
299
  }
300
 
301
+ $sentinel = $this->sentinels[$this->sentinelIndex];
302
+ ++$this->sentinelIndex;
303
  $this->sentinelConnection = $this->createSentinelConnection($sentinel);
304
  }
305
 
320
  );
321
 
322
  $this->sentinels = array();
323
+ $this->sentinelIndex = 0;
324
  // NOTE: sentinel server does not return itself, so we add it back.
325
  $this->sentinels[] = $sentinel->getParameters()->toArray();
326
 
dependencies/predis/predis/src/Connection/StreamConnection.php CHANGED
@@ -260,7 +260,7 @@ class StreamConnection extends AbstractConnection
260
  $socket = $this->getResource();
261
 
262
  while (($length = strlen($buffer)) > 0) {
263
- $written = @fwrite($socket, $buffer);
264
 
265
  if ($length === $written) {
266
  return;
@@ -304,7 +304,7 @@ class StreamConnection extends AbstractConnection
304
  $bytesLeft = ($size += 2);
305
 
306
  do {
307
- $chunk = fread($socket, min($bytesLeft, 4096));
308
 
309
  if ($chunk === false || $chunk === '') {
310
  $this->onConnectionError('Error while reading bytes from the server.');
260
  $socket = $this->getResource();
261
 
262
  while (($length = strlen($buffer)) > 0) {
263
+ $written = is_resource($socket) ? @fwrite($socket, $buffer) : false;
264
 
265
  if ($length === $written) {
266
  return;
304
  $bytesLeft = ($size += 2);
305
 
306
  do {
307
+ $chunk = is_resource($socket) ? fread($socket, min($bytesLeft, 4096)) : false;
308
 
309
  if ($chunk === false || $chunk === '') {
310
  $this->onConnectionError('Error while reading bytes from the server.');
includes/class-plugin.php CHANGED
@@ -241,25 +241,25 @@ class Plugin {
241
  }
242
 
243
  /**
244
- * Adds plugin meta links on the plugin page
245
- *
246
- * @param string[] $plugin_meta An array of the plugin's metadata.
247
- * @param string $plugin_file Path to the plugin file relative to the plugins directory.
248
- * @return string[] An array of the plugin's metadata.
249
- */
250
- public function add_plugin_row_meta( array $plugin_meta, $plugin_file ) {
251
- if ( strpos( $plugin_file, 'redis-cache.php' ) === false ) {
252
- return $plugin_meta;
253
- }
254
 
255
  $plugin_meta[] = sprintf(
256
- '<a href="%1$s"><span class="dashicons dashicons-star-filled" aria-hidden="true" style="font-size: 14px; line-height: 1.3"></span>%2$s</a>',
257
- 'https://objectcache.pro/?ref=oss&amp;utm_source=wp-plugin&amp;utm_medium=meta-row',
258
- esc_html_x( 'Upgrade to Pro', 'verb', 'redis-cache' )
259
- );
260
 
261
- return $plugin_meta;
262
- }
263
 
264
  /**
265
  * Enqueues admin style resources
@@ -775,7 +775,7 @@ class Plugin {
775
 
776
  $messages = get_settings_errors( 'redis-cache' );
777
 
778
- if ( ! empty( $messages ) ) {
779
  set_transient( 'settings_errors', $messages, 30 );
780
 
781
  wp_safe_redirect(
@@ -900,6 +900,7 @@ class Plugin {
900
  * @return void
901
  */
902
  public function maybe_print_comment() {
 
903
  global $wp_object_cache;
904
 
905
  if (
@@ -920,7 +921,6 @@ class Plugin {
920
  }
921
 
922
  if (
923
- ! isset( $wp_object_cache->cache_hits ) ||
924
  ! isset( $wp_object_cache->diagnostics ) ||
925
  ! is_array( $wp_object_cache->cache )
926
  ) {
241
  }
242
 
243
  /**
244
+ * Adds plugin meta links on the plugin page
245
+ *
246
+ * @param string[] $plugin_meta An array of the plugin's metadata.
247
+ * @param string $plugin_file Path to the plugin file relative to the plugins directory.
248
+ * @return string[] An array of the plugin's metadata.
249
+ */
250
+ public function add_plugin_row_meta( array $plugin_meta, $plugin_file ) {
251
+ if ( strpos( $plugin_file, 'redis-cache.php' ) === false ) {
252
+ return $plugin_meta;
253
+ }
254
 
255
  $plugin_meta[] = sprintf(
256
+ '<a href="%1$s"><span class="dashicons dashicons-star-filled" aria-hidden="true" style="font-size: 14px; line-height: 1.3"></span>%2$s</a>',
257
+ 'https://objectcache.pro/?ref=oss&amp;utm_source=wp-plugin&amp;utm_medium=meta-row',
258
+ esc_html_x( 'Upgrade to Pro', 'verb', 'redis-cache' )
259
+ );
260
 
261
+ return $plugin_meta;
262
+ }
263
 
264
  /**
265
  * Enqueues admin style resources
775
 
776
  $messages = get_settings_errors( 'redis-cache' );
777
 
778
+ if ( count( $messages ) !== 0 ) {
779
  set_transient( 'settings_errors', $messages, 30 );
780
 
781
  wp_safe_redirect(
900
  * @return void
901
  */
902
  public function maybe_print_comment() {
903
+ /** @var \WP_Object_Cache $wp_object_cache */
904
  global $wp_object_cache;
905
 
906
  if (
921
  }
922
 
923
  if (
 
924
  ! isset( $wp_object_cache->diagnostics ) ||
925
  ! is_array( $wp_object_cache->cache )
926
  ) {
includes/class-qm-collector.php CHANGED
@@ -72,10 +72,16 @@ class QM_Collector extends Base_Collector {
72
  'unflushable' => $info->groups->unflushable,
73
  ];
74
 
75
- // These are used by Query Monitor.
76
- $this->data['stats']['cache_hits'] = $info->hits;
77
- $this->data['stats']['cache_misses'] = $info->misses;
78
  $this->data['cache_hit_percentage'] = $info->ratio;
 
 
 
 
 
 
 
 
79
  }
80
 
81
  /**
72
  'unflushable' => $info->groups->unflushable,
73
  ];
74
 
75
+ // These are used by Query Monitor
 
 
76
  $this->data['cache_hit_percentage'] = $info->ratio;
77
+
78
+ if ( $this->data instanceof \QM_Data ) {
79
+ $this->data->stats['cache_hits'] = $info->hits;
80
+ $this->data->stats['cache_misses'] = $info->misses;
81
+ } else {
82
+ $this->data['stats']['cache_hits'] = $info->hits;
83
+ $this->data['stats']['cache_misses'] = $info->misses;
84
+ }
85
  }
86
 
87
  /**
includes/object-cache.php CHANGED
@@ -3,7 +3,7 @@
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.2.0
7
  * Author: Till Krüss
8
  * Author URI: https://objectcache.pro
9
  * License: GPLv3
@@ -18,6 +18,32 @@ defined( '\\ABSPATH' ) || exit;
18
  // phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact, Generic.WhiteSpace.ScopeIndent.Incorrect
19
  if ( ! defined( 'WP_REDIS_DISABLED' ) || ! WP_REDIS_DISABLED ) :
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  /**
22
  * Adds a value to cache.
23
  *
@@ -514,7 +540,7 @@ class WP_Object_Cache {
514
  }
515
 
516
  if ( defined( 'WP_REDIS_CLUSTER' ) ) {
517
- $connectionID = is_string( WP_REDIS_CLUSTER )
518
  ? WP_REDIS_CLUSTER
519
  : current( $this->build_cluster_connection_array() );
520
 
@@ -1170,6 +1196,7 @@ class WP_Object_Cache {
1170
 
1171
  $orig_exp = $expire;
1172
  $expire = $this->validate_expiration( $expire );
 
1173
 
1174
  foreach ( $data as $key => $value ) {
1175
  /**
@@ -1214,6 +1241,10 @@ class WP_Object_Cache {
1214
  return (bool) $this->parse_redis_response( $response );
1215
  }, $tx->{$method}() ?? [] );
1216
 
 
 
 
 
1217
  $results = array_combine( $keys, $results );
1218
 
1219
  foreach ( $results as $key => $result ) {
@@ -1360,7 +1391,7 @@ class WP_Object_Cache {
1360
  * @param string $group The group value appended to the $key.
1361
  * @return bool Returns TRUE on success or FALSE on failure.
1362
  */
1363
- public function delete( $key, $group = 'default' ) {
1364
  $result = false;
1365
 
1366
  $san_key = $this->sanitize_key_part( $key );
@@ -1459,6 +1490,10 @@ class WP_Object_Cache {
1459
  return (bool) $this->parse_redis_response( $response );
1460
  }, $tx->{$method}() ?? [] );
1461
 
 
 
 
 
1462
  $execute_time = microtime( true ) - $start_time;
1463
  } catch ( Exception $exception ) {
1464
  $this->handle_exception( $exception );
@@ -1734,8 +1769,6 @@ LUA;
1734
  * @return bool|mixed Cached object value.
1735
  */
1736
  public function get( $key, $group = 'default', $force = false, &$found = null ) {
1737
- $start_time = microtime( true );
1738
-
1739
  $san_key = $this->sanitize_key_part( $key );
1740
  $san_group = $this->sanitize_key_part( $group );
1741
  $derived_key = $this->fast_build_key( $san_key, $san_group );
@@ -1753,6 +1786,8 @@ LUA;
1753
  return false;
1754
  }
1755
 
 
 
1756
  try {
1757
  $result = $this->redis->get( $derived_key );
1758
  } catch ( Exception $exception ) {
@@ -2108,6 +2143,10 @@ LUA;
2108
  return (bool) $this->parse_redis_response( $response );
2109
  }, $tx->{$method}() ?? [] );
2110
 
 
 
 
 
2111
  $results = array_combine( $keys, $results );
2112
 
2113
  foreach ( $results as $key => $result ) {
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.2.1
7
  * Author: Till Krüss
8
  * Author URI: https://objectcache.pro
9
  * License: GPLv3
18
  // phpcs:disable Generic.WhiteSpace.ScopeIndent.IncorrectExact, Generic.WhiteSpace.ScopeIndent.Incorrect
19
  if ( ! defined( 'WP_REDIS_DISABLED' ) || ! WP_REDIS_DISABLED ) :
20
 
21
+ /**
22
+ * Determines whether the object cache implementation supports a particular feature.
23
+ *
24
+ * Possible values include:
25
+ * - `add_multiple`, `set_multiple`, `get_multiple` and `delete_multiple`
26
+ * - `flush_runtime` and `flush_group`
27
+ *
28
+ * @param string $feature Name of the feature to check for.
29
+ * @return bool True if the feature is supported, false otherwise.
30
+ */
31
+ function wp_cache_supports( $feature ) {
32
+ switch ( $feature ) {
33
+ case 'add_multiple':
34
+ case 'set_multiple':
35
+ case 'get_multiple':
36
+ case 'delete_multiple':
37
+ case 'flush_runtime':
38
+ return true;
39
+
40
+ case 'flush_group':
41
+ default:
42
+ return false;
43
+ }
44
+ }
45
+
46
+
47
  /**
48
  * Adds a value to cache.
49
  *
540
  }
541
 
542
  if ( defined( 'WP_REDIS_CLUSTER' ) ) {
543
+ $connectionID = is_string( WP_REDIS_CLUSTER )
544
  ? WP_REDIS_CLUSTER
545
  : current( $this->build_cluster_connection_array() );
546
 
1196
 
1197
  $orig_exp = $expire;
1198
  $expire = $this->validate_expiration( $expire );
1199
+ $derived_keys = [];
1200
 
1201
  foreach ( $data as $key => $value ) {
1202
  /**
1241
  return (bool) $this->parse_redis_response( $response );
1242
  }, $tx->{$method}() ?? [] );
1243
 
1244
+ if ( count( $results ) !== count( $keys ) ) {
1245
+ throw new Exception( 'Redis pipeline returned unexpected result' );
1246
+ }
1247
+
1248
  $results = array_combine( $keys, $results );
1249
 
1250
  foreach ( $results as $key => $result ) {
1391
  * @param string $group The group value appended to the $key.
1392
  * @return bool Returns TRUE on success or FALSE on failure.
1393
  */
1394
+ public function delete( $key, $group = 'default', $deprecated = false ) {
1395
  $result = false;
1396
 
1397
  $san_key = $this->sanitize_key_part( $key );
1490
  return (bool) $this->parse_redis_response( $response );
1491
  }, $tx->{$method}() ?? [] );
1492
 
1493
+ if ( count( $results ) !== count( $keys ) ) {
1494
+ throw new Exception( 'Redis pipeline returned unexpected result' );
1495
+ }
1496
+
1497
  $execute_time = microtime( true ) - $start_time;
1498
  } catch ( Exception $exception ) {
1499
  $this->handle_exception( $exception );
1769
  * @return bool|mixed Cached object value.
1770
  */
1771
  public function get( $key, $group = 'default', $force = false, &$found = null ) {
 
 
1772
  $san_key = $this->sanitize_key_part( $key );
1773
  $san_group = $this->sanitize_key_part( $group );
1774
  $derived_key = $this->fast_build_key( $san_key, $san_group );
1786
  return false;
1787
  }
1788
 
1789
+ $start_time = microtime( true );
1790
+
1791
  try {
1792
  $result = $this->redis->get( $derived_key );
1793
  } catch ( Exception $exception ) {
2143
  return (bool) $this->parse_redis_response( $response );
2144
  }, $tx->{$method}() ?? [] );
2145
 
2146
+ if ( count( $results ) !== count( $keys ) ) {
2147
+ throw new Exception( 'Redis pipeline returned unexpected result' );
2148
+ }
2149
+
2150
  $results = array_combine( $keys, $results );
2151
 
2152
  foreach ( $results as $key => $result ) {
includes/ui/query-monitor.php CHANGED
@@ -7,6 +7,11 @@
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
 
 
 
 
 
10
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
11
  echo $this->before_non_tabular_output();
12
  ?>
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
10
+ /**
11
+ * @var \Rhubarb\RedisCache\QM_Output $this
12
+ * @var array<mixed> $data
13
+ */
14
+
15
  // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
16
  echo $this->before_non_tabular_output();
17
  ?>
includes/ui/tabs/overview.php CHANGED
@@ -7,6 +7,8 @@
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
 
 
10
  /** @var \Rhubarb\RedisCache\Plugin $roc */
11
  $status = $roc->get_redis_status();
12
  $redis_client = $roc->get_redis_client_name();
@@ -71,7 +73,7 @@ $diagnostics = $roc->get_diagnostics();
71
  <tr>
72
  <th><?php esc_html_e( 'Filesystem:', 'redis-cache' ); ?></th>
73
  <td>
74
- <?php if ( ! $roc->test_filesystem_writing() ) : ?>
75
  <span class="error">
76
  <span class="dashicons dashicons-no"></span>
77
  <?php esc_html_e( 'Not writeable', 'redis-cache' ); ?>
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
10
+ use WP_Error;
11
+
12
  /** @var \Rhubarb\RedisCache\Plugin $roc */
13
  $status = $roc->get_redis_status();
14
  $redis_client = $roc->get_redis_client_name();
73
  <tr>
74
  <th><?php esc_html_e( 'Filesystem:', 'redis-cache' ); ?></th>
75
  <td>
76
+ <?php if ( $roc->test_filesystem_writing() instanceof WP_Error ) : ?>
77
  <span class="error">
78
  <span class="dashicons dashicons-no"></span>
79
  <?php esc_html_e( 'Not writeable', 'redis-cache' ); ?>
includes/ui/widget.php CHANGED
@@ -7,6 +7,8 @@
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
 
 
10
  ?>
11
  <div id="widget-redis-stats">
12
 
7
 
8
  defined( '\\ABSPATH' ) || exit;
9
 
10
+ /** @var \Rhubarb\RedisCache\Plugin $this */
11
+
12
  ?>
13
  <div id="widget-redis-stats">
14
 
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.2.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-08-26T19:11:13+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"
@@ -42,7 +42,7 @@ msgid "Redis"
42
  msgstr ""
43
 
44
  #: includes/class-plugin.php:178
45
- #: includes/ui/tabs/overview.php:22
46
  msgid "Overview"
47
  msgstr ""
48
 
@@ -55,7 +55,7 @@ msgid "Diagnostics"
55
  msgstr ""
56
 
57
  #: includes/class-plugin.php:237
58
- #: includes/ui/widget.php:36
59
  msgid "Settings"
60
  msgstr ""
61
 
@@ -66,25 +66,25 @@ msgstr ""
66
 
67
  #: includes/class-plugin.php:332
68
  #: includes/ui/tabs/metrics.php:17
69
- #: includes/ui/widget.php:16
70
  msgid "Time"
71
  msgstr ""
72
 
73
  #: includes/class-plugin.php:333
74
  #: includes/ui/tabs/metrics.php:22
75
- #: includes/ui/widget.php:21
76
  msgid "Bytes"
77
  msgstr ""
78
 
79
  #: includes/class-plugin.php:334
80
  #: includes/ui/tabs/metrics.php:27
81
- #: includes/ui/widget.php:26
82
  msgid "Ratio"
83
  msgstr ""
84
 
85
  #: includes/class-plugin.php:335
86
  #: includes/ui/tabs/metrics.php:32
87
- #: includes/ui/widget.php:31
88
  msgid "Calls"
89
  msgstr ""
90
 
@@ -118,110 +118,110 @@ msgid "Not connected"
118
  msgstr ""
119
 
120
  #: includes/class-plugin.php:500
121
- #: includes/ui/tabs/overview.php:270
122
  msgid "Unknown"
123
  msgstr ""
124
 
125
  #. translators: %s = Action link to update the drop-in.
126
- #: includes/class-plugin.php:624
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:631
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 ""
134
 
135
- #: includes/class-plugin.php:669
136
  msgid "Object cache flushed."
137
  msgstr ""
138
 
139
- #: includes/class-plugin.php:675
140
  msgid "Object cache could not be flushed."
141
  msgstr ""
142
 
143
- #: includes/class-plugin.php:703
144
  #: includes/cli/class-commands.php:74
145
  msgid "Object cache enabled."
146
  msgstr ""
147
 
148
- #: includes/class-plugin.php:709
149
  #: includes/cli/class-commands.php:76
150
  msgid "Object cache could not be enabled."
151
  msgstr ""
152
 
153
- #: includes/class-plugin.php:729
154
  #: includes/cli/class-commands.php:113
155
  msgid "Object cache disabled."
156
  msgstr ""
157
 
158
- #: includes/class-plugin.php:735
159
  #: includes/cli/class-commands.php:115
160
  msgid "Object cache could not be disabled."
161
  msgstr ""
162
 
163
- #: includes/class-plugin.php:760
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:766
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:833
174
  msgid "Object Cache Pro!"
175
  msgstr ""
176
 
177
  #. translators: %s = Link to the plugin setting screen.
178
- #: includes/class-plugin.php:836
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:873
183
  msgid "Object Cache Pro + WooCommerce = ❤️"
184
  msgstr ""
185
 
186
  #. translators: %s = Link to the plugin's settings screen.
187
- #: includes/class-plugin.php:876
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:942
193
  msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
194
  msgstr ""
195
 
196
- #: includes/class-plugin.php:999
197
  msgid "Could not initialize filesystem."
198
  msgstr ""
199
 
200
- #: includes/class-plugin.php:1006
201
  msgid "Object cache file doesn’t exist."
202
  msgstr ""
203
 
204
- #: includes/class-plugin.php:1011
205
  msgid "Test file exists, but couldn’t be deleted."
206
  msgstr ""
207
 
208
- #: includes/class-plugin.php:1016
209
  msgid "Content directory is not writable."
210
  msgstr ""
211
 
212
- #: includes/class-plugin.php:1020
213
  msgid "Failed to copy test file."
214
  msgstr ""
215
 
216
- #: includes/class-plugin.php:1024
217
  msgid "Copied test file doesn’t exist."
218
  msgstr ""
219
 
220
- #: includes/class-plugin.php:1030
221
  msgid "Couldn’t verify test file contents."
222
  msgstr ""
223
 
224
- #: includes/class-plugin.php:1034
225
  msgid "Copied test file couldn’t be deleted."
226
  msgstr ""
227
 
@@ -230,7 +230,7 @@ msgid "Object Cache"
230
  msgstr ""
231
 
232
  #: includes/class-qm-collector.php:66
233
- #: includes/ui/tabs/overview.php:92
234
  msgid "Yes"
235
  msgstr ""
236
 
@@ -260,43 +260,43 @@ msgstr ""
260
  msgid "%s are disabled for this site."
261
  msgstr ""
262
 
263
- #: includes/ui/query-monitor.php:15
264
  msgid "Status"
265
  msgstr ""
266
 
267
- #: includes/ui/query-monitor.php:20
268
  msgid "Hit Ratio"
269
  msgstr ""
270
 
271
- #: includes/ui/query-monitor.php:25
272
  msgid "Hits"
273
  msgstr ""
274
 
275
- #: includes/ui/query-monitor.php:30
276
  msgid "Misses"
277
  msgstr ""
278
 
279
- #: includes/ui/query-monitor.php:35
280
  msgid "Size"
281
  msgstr ""
282
 
283
- #: includes/ui/query-monitor.php:45
284
  msgid "Errors"
285
  msgstr ""
286
 
287
- #: includes/ui/query-monitor.php:68
288
  msgid "Global Groups"
289
  msgstr ""
290
 
291
- #: includes/ui/query-monitor.php:82
292
  msgid "Non-persistent Groups"
293
  msgstr ""
294
 
295
- #: includes/ui/query-monitor.php:96
296
  msgid "Unflushable Groups"
297
  msgstr ""
298
 
299
- #: includes/ui/query-monitor.php:110
300
  msgid "Metadata"
301
  msgstr ""
302
 
@@ -375,152 +375,152 @@ msgid "Copy diagnostics to clipboard"
375
  msgstr ""
376
 
377
  #: includes/ui/tabs/metrics.php:16
378
- #: includes/ui/widget.php:15
379
  msgid "The total amount of time (in milliseconds) it took Redis to return cache data."
380
  msgstr ""
381
 
382
  #: includes/ui/tabs/metrics.php:21
383
- #: includes/ui/widget.php:20
384
  msgid "The total amount of bytes that was retrieved from Redis."
385
  msgstr ""
386
 
387
  #: includes/ui/tabs/metrics.php:26
388
- #: includes/ui/widget.php:25
389
  msgid "The hit/miss ratio of cache data that was already cached."
390
  msgstr ""
391
 
392
  #: includes/ui/tabs/metrics.php:31
393
- #: includes/ui/widget.php:30
394
  msgid "The total amount of commands sent to Redis."
395
  msgstr ""
396
 
397
- #: includes/ui/tabs/overview.php:28
398
  msgid "Status:"
399
  msgstr ""
400
 
401
- #: includes/ui/tabs/overview.php:45
402
  msgid "Drop-in:"
403
  msgstr ""
404
 
405
- #: includes/ui/tabs/overview.php:50
406
  msgid "Not installed"
407
  msgstr ""
408
 
409
- #: includes/ui/tabs/overview.php:55
410
  msgid "Outdated"
411
  msgstr ""
412
 
413
- #: includes/ui/tabs/overview.php:60
414
  msgid "Valid"
415
  msgstr ""
416
 
417
- #: includes/ui/tabs/overview.php:65
418
  msgid "Invalid"
419
  msgstr ""
420
 
421
- #: includes/ui/tabs/overview.php:72
422
  msgid "Filesystem:"
423
  msgstr ""
424
 
425
- #: includes/ui/tabs/overview.php:77
426
  msgid "Not writeable"
427
  msgstr ""
428
 
429
- #: includes/ui/tabs/overview.php:82
430
  msgid "Writeable"
431
  msgstr ""
432
 
433
- #: includes/ui/tabs/overview.php:90
434
  msgid "Disabled:"
435
  msgstr ""
436
 
437
- #: includes/ui/tabs/overview.php:99
438
  msgid "Key Prefix:"
439
  msgstr ""
440
 
441
- #: includes/ui/tabs/overview.php:108
442
  msgid "Max. TTL:"
443
  msgstr ""
444
 
445
- #: includes/ui/tabs/overview.php:114
446
  msgid "This doesn’t appear to be a valid number."
447
  msgstr ""
448
 
449
- #: includes/ui/tabs/overview.php:126
450
  msgid "Connection"
451
  msgstr ""
452
 
453
- #: includes/ui/tabs/overview.php:133
454
  msgid "Client:"
455
  msgstr ""
456
 
457
- #: includes/ui/tabs/overview.php:142
458
  msgid "Host:"
459
  msgstr ""
460
 
461
- #: includes/ui/tabs/overview.php:149
462
  msgid "Cluster:"
463
  msgstr ""
464
 
465
- #: includes/ui/tabs/overview.php:162
466
  msgid "Shards:"
467
  msgstr ""
468
 
469
- #: includes/ui/tabs/overview.php:175
470
  msgid "Servers:"
471
  msgstr ""
472
 
473
- #: includes/ui/tabs/overview.php:188
474
  msgid "Port:"
475
  msgstr ""
476
 
477
- #: includes/ui/tabs/overview.php:195
478
  msgid "Username:"
479
  msgstr ""
480
 
481
- #: includes/ui/tabs/overview.php:202
482
  msgid "Password:"
483
  msgstr ""
484
 
485
- #: includes/ui/tabs/overview.php:211
486
  msgid "Database:"
487
  msgstr ""
488
 
489
- #: includes/ui/tabs/overview.php:218
490
  msgid "Connection Timeout:"
491
  msgstr ""
492
 
493
  #. translators: %s = Redis connection/read timeout in seconds.
494
- #: includes/ui/tabs/overview.php:224
495
- #: includes/ui/tabs/overview.php:241
496
  msgid "%ss"
497
  msgstr ""
498
 
499
- #: includes/ui/tabs/overview.php:235
500
  msgid "Read Timeout:"
501
  msgstr ""
502
 
503
- #: includes/ui/tabs/overview.php:252
504
  msgid "Retry Interval:"
505
  msgstr ""
506
 
507
  #. translators: %s = Redis retry interval in milliseconds.
508
- #: includes/ui/tabs/overview.php:258
509
  msgid "%sms"
510
  msgstr ""
511
 
512
- #: includes/ui/tabs/overview.php:269
513
  msgid "Redis Version:"
514
  msgstr ""
515
 
516
- #: includes/ui/tabs/overview.php:282
517
  msgid "Flush Cache"
518
  msgstr ""
519
 
520
- #: includes/ui/tabs/overview.php:288
521
  msgid "Disable Object Cache"
522
  msgstr ""
523
 
524
- #: includes/ui/tabs/overview.php:292
525
  msgid "Enable Object Cache"
526
  msgstr ""
2
  # This file is distributed under the GPLv3.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Redis Object Cache 2.2.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-10-31T01:02:46+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"
42
  msgstr ""
43
 
44
  #: includes/class-plugin.php:178
45
+ #: includes/ui/tabs/overview.php:24
46
  msgid "Overview"
47
  msgstr ""
48
 
55
  msgstr ""
56
 
57
  #: includes/class-plugin.php:237
58
+ #: includes/ui/widget.php:38
59
  msgid "Settings"
60
  msgstr ""
61
 
66
 
67
  #: includes/class-plugin.php:332
68
  #: includes/ui/tabs/metrics.php:17
69
+ #: includes/ui/widget.php:18
70
  msgid "Time"
71
  msgstr ""
72
 
73
  #: includes/class-plugin.php:333
74
  #: includes/ui/tabs/metrics.php:22
75
+ #: includes/ui/widget.php:23
76
  msgid "Bytes"
77
  msgstr ""
78
 
79
  #: includes/class-plugin.php:334
80
  #: includes/ui/tabs/metrics.php:27
81
+ #: includes/ui/widget.php:28
82
  msgid "Ratio"
83
  msgstr ""
84
 
85
  #: includes/class-plugin.php:335
86
  #: includes/ui/tabs/metrics.php:32
87
+ #: includes/ui/widget.php:33
88
  msgid "Calls"
89
  msgstr ""
90
 
118
  msgstr ""
119
 
120
  #: includes/class-plugin.php:500
121
+ #: includes/ui/tabs/overview.php:272
122
  msgid "Unknown"
123
  msgstr ""
124
 
125
  #. translators: %s = Action link to update the drop-in.
126
+ #: includes/class-plugin.php:628
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:635
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 ""
134
 
135
+ #: includes/class-plugin.php:673
136
  msgid "Object cache flushed."
137
  msgstr ""
138
 
139
+ #: includes/class-plugin.php:679
140
  msgid "Object cache could not be flushed."
141
  msgstr ""
142
 
143
+ #: includes/class-plugin.php:707
144
  #: includes/cli/class-commands.php:74
145
  msgid "Object cache enabled."
146
  msgstr ""
147
 
148
+ #: includes/class-plugin.php:713
149
  #: includes/cli/class-commands.php:76
150
  msgid "Object cache could not be enabled."
151
  msgstr ""
152
 
153
+ #: includes/class-plugin.php:733
154
  #: includes/cli/class-commands.php:113
155
  msgid "Object cache disabled."
156
  msgstr ""
157
 
158
+ #: includes/class-plugin.php:739
159
  #: includes/cli/class-commands.php:115
160
  msgid "Object cache could not be disabled."
161
  msgstr ""
162
 
163
+ #: includes/class-plugin.php:764
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:770
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:837
174
  msgid "Object Cache Pro!"
175
  msgstr ""
176
 
177
  #. translators: %s = Link to the plugin setting screen.
178
+ #: includes/class-plugin.php:840
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:877
183
  msgid "Object Cache Pro + WooCommerce = ❤️"
184
  msgstr ""
185
 
186
  #. translators: %s = Link to the plugin's settings screen.
187
+ #: includes/class-plugin.php:880
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:946
193
  msgid "Retrieved %1$d objects (%2$s) from Redis using %3$s."
194
  msgstr ""
195
 
196
+ #: includes/class-plugin.php:1003
197
  msgid "Could not initialize filesystem."
198
  msgstr ""
199
 
200
+ #: includes/class-plugin.php:1010
201
  msgid "Object cache file doesn’t exist."
202
  msgstr ""
203
 
204
+ #: includes/class-plugin.php:1015
205
  msgid "Test file exists, but couldn’t be deleted."
206
  msgstr ""
207
 
208
+ #: includes/class-plugin.php:1020
209
  msgid "Content directory is not writable."
210
  msgstr ""
211
 
212
+ #: includes/class-plugin.php:1024
213
  msgid "Failed to copy test file."
214
  msgstr ""
215
 
216
+ #: includes/class-plugin.php:1028
217
  msgid "Copied test file doesn’t exist."
218
  msgstr ""
219
 
220
+ #: includes/class-plugin.php:1034
221
  msgid "Couldn’t verify test file contents."
222
  msgstr ""
223
 
224
+ #: includes/class-plugin.php:1038
225
  msgid "Copied test file couldn’t be deleted."
226
  msgstr ""
227
 
230
  msgstr ""
231
 
232
  #: includes/class-qm-collector.php:66
233
+ #: includes/ui/tabs/overview.php:94
234
  msgid "Yes"
235
  msgstr ""
236
 
260
  msgid "%s are disabled for this site."
261
  msgstr ""
262
 
263
+ #: includes/ui/query-monitor.php:20
264
  msgid "Status"
265
  msgstr ""
266
 
267
+ #: includes/ui/query-monitor.php:25
268
  msgid "Hit Ratio"
269
  msgstr ""
270
 
271
+ #: includes/ui/query-monitor.php:30
272
  msgid "Hits"
273
  msgstr ""
274
 
275
+ #: includes/ui/query-monitor.php:35
276
  msgid "Misses"
277
  msgstr ""
278
 
279
+ #: includes/ui/query-monitor.php:40
280
  msgid "Size"
281
  msgstr ""
282
 
283
+ #: includes/ui/query-monitor.php:50
284
  msgid "Errors"
285
  msgstr ""
286
 
287
+ #: includes/ui/query-monitor.php:73
288
  msgid "Global Groups"
289
  msgstr ""
290
 
291
+ #: includes/ui/query-monitor.php:87
292
  msgid "Non-persistent Groups"
293
  msgstr ""
294
 
295
+ #: includes/ui/query-monitor.php:101
296
  msgid "Unflushable Groups"
297
  msgstr ""
298
 
299
+ #: includes/ui/query-monitor.php:115
300
  msgid "Metadata"
301
  msgstr ""
302
 
375
  msgstr ""
376
 
377
  #: includes/ui/tabs/metrics.php:16
378
+ #: includes/ui/widget.php:17
379
  msgid "The total amount of time (in milliseconds) it took Redis to return cache data."
380
  msgstr ""
381
 
382
  #: includes/ui/tabs/metrics.php:21
383
+ #: includes/ui/widget.php:22
384
  msgid "The total amount of bytes that was retrieved from Redis."
385
  msgstr ""
386
 
387
  #: includes/ui/tabs/metrics.php:26
388
+ #: includes/ui/widget.php:27
389
  msgid "The hit/miss ratio of cache data that was already cached."
390
  msgstr ""
391
 
392
  #: includes/ui/tabs/metrics.php:31
393
+ #: includes/ui/widget.php:32
394
  msgid "The total amount of commands sent to Redis."
395
  msgstr ""
396
 
397
+ #: includes/ui/tabs/overview.php:30
398
  msgid "Status:"
399
  msgstr ""
400
 
401
+ #: includes/ui/tabs/overview.php:47
402
  msgid "Drop-in:"
403
  msgstr ""
404
 
405
+ #: includes/ui/tabs/overview.php:52
406
  msgid "Not installed"
407
  msgstr ""
408
 
409
+ #: includes/ui/tabs/overview.php:57
410
  msgid "Outdated"
411
  msgstr ""
412
 
413
+ #: includes/ui/tabs/overview.php:62
414
  msgid "Valid"
415
  msgstr ""
416
 
417
+ #: includes/ui/tabs/overview.php:67
418
  msgid "Invalid"
419
  msgstr ""
420
 
421
+ #: includes/ui/tabs/overview.php:74
422
  msgid "Filesystem:"
423
  msgstr ""
424
 
425
+ #: includes/ui/tabs/overview.php:79
426
  msgid "Not writeable"
427
  msgstr ""
428
 
429
+ #: includes/ui/tabs/overview.php:84
430
  msgid "Writeable"
431
  msgstr ""
432
 
433
+ #: includes/ui/tabs/overview.php:92
434
  msgid "Disabled:"
435
  msgstr ""
436
 
437
+ #: includes/ui/tabs/overview.php:101
438
  msgid "Key Prefix:"
439
  msgstr ""
440
 
441
+ #: includes/ui/tabs/overview.php:110
442
  msgid "Max. TTL:"
443
  msgstr ""
444
 
445
+ #: includes/ui/tabs/overview.php:116
446
  msgid "This doesn’t appear to be a valid number."
447
  msgstr ""
448
 
449
+ #: includes/ui/tabs/overview.php:128
450
  msgid "Connection"
451
  msgstr ""
452
 
453
+ #: includes/ui/tabs/overview.php:135
454
  msgid "Client:"
455
  msgstr ""
456
 
457
+ #: includes/ui/tabs/overview.php:144
458
  msgid "Host:"
459
  msgstr ""
460
 
461
+ #: includes/ui/tabs/overview.php:151
462
  msgid "Cluster:"
463
  msgstr ""
464
 
465
+ #: includes/ui/tabs/overview.php:164
466
  msgid "Shards:"
467
  msgstr ""
468
 
469
+ #: includes/ui/tabs/overview.php:177
470
  msgid "Servers:"
471
  msgstr ""
472
 
473
+ #: includes/ui/tabs/overview.php:190
474
  msgid "Port:"
475
  msgstr ""
476
 
477
+ #: includes/ui/tabs/overview.php:197
478
  msgid "Username:"
479
  msgstr ""
480
 
481
+ #: includes/ui/tabs/overview.php:204
482
  msgid "Password:"
483
  msgstr ""
484
 
485
+ #: includes/ui/tabs/overview.php:213
486
  msgid "Database:"
487
  msgstr ""
488
 
489
+ #: includes/ui/tabs/overview.php:220
490
  msgid "Connection Timeout:"
491
  msgstr ""
492
 
493
  #. translators: %s = Redis connection/read timeout in seconds.
494
+ #: includes/ui/tabs/overview.php:226
495
+ #: includes/ui/tabs/overview.php:243
496
  msgid "%ss"
497
  msgstr ""
498
 
499
+ #: includes/ui/tabs/overview.php:237
500
  msgid "Read Timeout:"
501
  msgstr ""
502
 
503
+ #: includes/ui/tabs/overview.php:254
504
  msgid "Retry Interval:"
505
  msgstr ""
506
 
507
  #. translators: %s = Redis retry interval in milliseconds.
508
+ #: includes/ui/tabs/overview.php:260
509
  msgid "%sms"
510
  msgstr ""
511
 
512
+ #: includes/ui/tabs/overview.php:271
513
  msgid "Redis Version:"
514
  msgstr ""
515
 
516
+ #: includes/ui/tabs/overview.php:284
517
  msgid "Flush Cache"
518
  msgstr ""
519
 
520
+ #: includes/ui/tabs/overview.php:290
521
  msgid "Disable Object Cache"
522
  msgstr ""
523
 
524
+ #: includes/ui/tabs/overview.php:294
525
  msgid "Enable Object Cache"
526
  msgstr ""
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.2.0
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -83,6 +83,14 @@ To see a list of all available WP-CLI commands, please see the [WP CLI commands
83
 
84
  == Changelog ==
85
 
 
 
 
 
 
 
 
 
86
  = 2.2.0 =
87
 
88
  - Added `redis_cache_add_non_persistent_groups` filter
@@ -399,212 +407,212 @@ _The HTML footer comment only prints debug information when `WP_DEBUG` is enable
399
 
400
  Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.
401
 
402
- * Removed lowercasing keys
403
- * Remove scheduled metrics event
404
- * Fixed Redis version call when using replication
405
 
406
  = 1.5.4 =
407
 
408
- * Removed metrics
409
 
410
  = 1.5.3 =
411
 
412
- * Fixed: Call to undefined function `get_plugin_data()`
413
- * Fixed: Call to undefined method `WP_Object_Cache::redis_version()`
414
 
415
  = 1.5.2 =
416
 
417
- * Added Redis version to diagnostics
418
- * Added `WP_REDIS_DISABLE_BANNERS` constant to disable promotions
419
- * Fixed an issue with `redis.replicate_commands()`
420
 
421
  = 1.5.1 =
422
 
423
  This plugin turned 5 years today (Nov 14th) and its only fitting to release the business edition today as well.
424
  [Object Cache Pro](https://objectcache.pro/) is a truly reliable, highly optimized and easy to debug rewrite of this plugin for SMBs.
425
 
426
- * Added execution times to actions
427
- * Added `WP_REDIS_VERSION` constant
428
- * Fixed PhpRedis v3 compatibility
429
- * Fixed an issue with selective flushing
430
- * Fixed an issue with `mb_*` functions not existing
431
- * Replaced Email Address Encoder card with Redis Cache Pro card
432
- * Gather version metrics for better decision making
433
 
434
  = 1.5.0 =
435
 
436
  Since Predis isn't maintained any longer, it's highly recommended to switch over to PhpRedis (the Redis PECL extension).
437
 
438
- * Improved Redis key name builder
439
- * Added support for PhpRedis serializers
440
- * Added `redis_object_cache_error` action
441
- * Added timeout, read-timeout and retry configuration
442
- * Added unflushable groups (defaults to `['userlogins']`)
443
- * Fixed passwords not showing in server list
444
 
445
  = 1.4.3 =
446
 
447
- * Require PHP 5.4 or newer
448
- * Use pretty print in diagnostics
449
- * Throw exception if Redis library is missing
450
- * Fixed cache not flushing for some users
451
- * Fixed admin issues when `WP_REDIS_DISABLED` is `false`
452
 
453
  = 1.4.2 =
454
 
455
- * Added graceful Redis failures and `WP_REDIS_GRACEFUL` constant
456
- * Improved cluster support
457
- * Added `redis_cache_expiration` filter
458
- * Renamed `redis_object_cache_get` filter to `redis_object_cache_get_value`
459
 
460
  = 1.4.1 =
461
 
462
- * Fixed potential fatal error related to `wp_suspend_cache_addition()`
463
 
464
  = 1.4.0 =
465
 
466
- * Added support for igbinary
467
- * Added support for `wp_suspend_cache_addition()`
468
 
469
  = 1.3.9 =
470
 
471
- * Fixed `WP_REDIS_SHARDS` not showing up in server list
472
- * Fixed `WP_REDIS_SHARDS` not working when using PECL extension
473
- * Removed `WP_REDIS_SCHEME` and `WP_REDIS_PATH` leftovers
474
 
475
  = 1.3.8 =
476
 
477
- * Switched from single file Predis version to full library
478
 
479
  = 1.3.7 =
480
 
481
- * Revert back to single file Predis version
482
 
483
  = 1.3.6 =
484
 
485
- * Added support for Redis Sentinel
486
- * Added support for sharing
487
- * Switched to PHAR version of Predis
488
- * Improved diagnostics
489
- * Added `WP_REDIS_SELECTIVE_FLUSH`
490
- * Added `$fail_gracefully` parameter to `WP_Object_Cache::__construct()`
491
- * Always enforce `WP_REDIS_MAXTTL`
492
- * Pass `$selective` and `$salt` to `redis_object_cache_flush` action
493
- * Don’t set `WP_CACHE_KEY_SALT` constant
494
 
495
  = 1.3.5 =
496
 
497
- * Added basic diagnostics to admin interface
498
- * Added `WP_REDIS_DISABLED` constant to disable cache at runtime
499
- * Prevent "Invalid plugin header" error
500
- * Return integer from `increment()` and `decrement()` methods
501
- * Prevent object cache from being instantiated more than once
502
- * Always separate cache key `prefix` and `group` by semicolon
503
- * Improved performance of `build_key()`
504
- * Only apply `redis_object_cache_get` filter if callbacks have been registered
505
- * Fixed `add_or_replace()` to only set cache key if it doesn't exist
506
- * Added `redis_object_cache_flush` action
507
- * Added `redis_object_cache_enable` action
508
- * Added `redis_object_cache_disable` action
509
- * Added `redis_object_cache_update_dropin` action
510
 
511
  = 1.3.4 =
512
 
513
- * Added WP-CLI support
514
- * Show host and port unless scheme is unix
515
- * Updated default global and ignored groups
516
- * Do a cache flush when activating, deactivating and uninstalling
517
 
518
  = 1.3.3 =
519
 
520
- * Updated Predis to `v1.1.1`
521
- * Added `redis_instance()` method
522
- * Added `incr()` method alias for Batcache compatibility
523
- * Added `WP_REDIS_GLOBAL_GROUPS` and `WP_REDIS_IGNORED_GROUPS` constant
524
- * Added `redis_object_cache_delete` action
525
- * Use `WP_PLUGIN_DIR` with `WP_CONTENT_DIR` as fallback
526
- * Set password when using a cluster or replication
527
- * Show Redis client in `stats()`
528
- * Change visibility of `$cache` to public
529
- * Use old array syntax, just in case
530
 
531
  = 1.3.2 =
532
 
533
- * Make sure `$result` is not `false` in `WP_Object_Cache::get()`
534
 
535
  = 1.3.1 =
536
 
537
- * Fixed connection issue
538
 
539
  = 1.3 =
540
 
541
- * New admin interface
542
- * Added support for `wp_cache_get()`'s `$force` and `$found` parameter
543
- * Added support for clustering and replication with Predis
544
 
545
  = 1.2.3 =
546
 
547
- * UI improvements
548
 
549
  = 1.2.2 =
550
 
551
- * Added `redis_object_cache_set` action
552
- * Added `redis_object_cache_get` action and filter
553
- * Prevented duplicated admin status messages
554
- * Load bundled Predis library only if necessary
555
- * Load bundled Predis library using `WP_CONTENT_DIR` constant
556
- * Updated `stats()` method output to be uniform with WordPress
557
 
558
  = 1.2.1 =
559
 
560
- * Added `composer.json`
561
- * Added deactivation and uninstall hooks to delete `object-cache.php`
562
- * Added local serialization functions for better `advanced-cache.php` support
563
- * Updated bundled Predis version to `1.0.3`
564
- * Updated heading structure to be semantic
565
 
566
  = 1.2 =
567
 
568
- * Added Multisite support
569
- * Moved admin menu under _Settings_ menu
570
- * Fixed PHP notice in `get_redis_client_name()`
571
 
572
  = 1.1.1 =
573
 
574
- * Call `select()` and optionally `auth()` if HHVM extension is used
575
 
576
  = 1.1 =
577
 
578
- * Added support for HHVM's Redis extension
579
- * Added support for PECL Redis extension
580
- * Added `WP_REDIS_CLIENT` constant, to set preferred Redis client
581
- * Added `WP_REDIS_MAXTTL` constant, to force expiration of cache keys
582
- * Improved `add_or_replace()`, `get()`, `set()` and `delete()` methods
583
- * Improved admin screen styles
584
- * Removed all internationalization/localization from drop-in
585
 
586
  = 1.0.2 =
587
 
588
- * Added "Flush Cache" button
589
- * Added support for UNIX domain sockets
590
- * Improved cache object retrieval performance significantly
591
- * Updated bundled Predis library to version `1.0.1`
592
 
593
  = 1.0.1 =
594
 
595
- * Load plugin translations
596
- * Hide global admin notices from non-admin users
597
- * Prevent direct file access to `redis-cache.php` and `admin-page.php`
598
- * Colorize "Disable Object Cache" button
599
- * Call `Predis\Client->connect()` to avoid potential uncaught `Predis\Connection\ConnectionException`
600
 
601
  = 1.0 =
602
 
603
- * Initial release
604
 
605
 
606
  == Upgrade Notice ==
607
 
608
- = 2.2.0 =
609
 
610
- 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, object cache, cache, object caching, caching performance, relay, predis, phpredis
5
  Requires at least: 3.3
6
  Tested up to: 6.0
7
  Requires PHP: 7.2
8
+ Stable tag: 2.2.1
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.2.1 =
87
+
88
+ - Added WordPress 6.1 `wp_cache_supports()` function
89
+ - Updated Predis to v2.0.3
90
+ - Avoid early `microtime()` calls in `WP_Object_Cache::get()`
91
+ - Support Query Monitor's new `QM_Data` class
92
+ - Throw exception of pipeline returns unexpected results
93
+
94
  = 2.2.0 =
95
 
96
  - Added `redis_cache_add_non_persistent_groups` filter
407
 
408
  Please flush the object cache after updating the drop to v1.5.5 to avoid dead keys filling up Redis memory.
409
 
410
+ - Removed lowercasing keys
411
+ - Remove scheduled metrics event
412
+ - Fixed Redis version call when using replication
413
 
414
  = 1.5.4 =
415
 
416
+ - Removed metrics
417
 
418
  = 1.5.3 =
419
 
420
+ - Fixed: Call to undefined function `get_plugin_data()`
421
+ - Fixed: Call to undefined method `WP_Object_Cache::redis_version()`
422
 
423
  = 1.5.2 =
424
 
425
+ - Added Redis version to diagnostics
426
+ - Added `WP_REDIS_DISABLE_BANNERS` constant to disable promotions
427
+ - Fixed an issue with `redis.replicate_commands()`
428
 
429
  = 1.5.1 =
430
 
431
  This plugin turned 5 years today (Nov 14th) and its only fitting to release the business edition today as well.
432
  [Object Cache Pro](https://objectcache.pro/) is a truly reliable, highly optimized and easy to debug rewrite of this plugin for SMBs.
433
 
434
+ - Added execution times to actions
435
+ - Added `WP_REDIS_VERSION` constant
436
+ - Fixed PhpRedis v3 compatibility
437
+ - Fixed an issue with selective flushing
438
+ - Fixed an issue with `mb_*` functions not existing
439
+ - Replaced Email Address Encoder card with Redis Cache Pro card
440
+ - Gather version metrics for better decision making
441
 
442
  = 1.5.0 =
443
 
444
  Since Predis isn't maintained any longer, it's highly recommended to switch over to PhpRedis (the Redis PECL extension).
445
 
446
+ - Improved Redis key name builder
447
+ - Added support for PhpRedis serializers
448
+ - Added `redis_object_cache_error` action
449
+ - Added timeout, read-timeout and retry configuration
450
+ - Added unflushable groups (defaults to `['userlogins']`)
451
+ - Fixed passwords not showing in server list
452
 
453
  = 1.4.3 =
454
 
455
+ - Require PHP 5.4 or newer
456
+ - Use pretty print in diagnostics
457
+ - Throw exception if Redis library is missing
458
+ - Fixed cache not flushing for some users
459
+ - Fixed admin issues when `WP_REDIS_DISABLED` is `false`
460
 
461
  = 1.4.2 =
462
 
463
+ - Added graceful Redis failures and `WP_REDIS_GRACEFUL` constant
464
+ - Improved cluster support
465
+ - Added `redis_cache_expiration` filter
466
+ - Renamed `redis_object_cache_get` filter to `redis_object_cache_get_value`
467
 
468
  = 1.4.1 =
469
 
470
+ - Fixed potential fatal error related to `wp_suspend_cache_addition()`
471
 
472
  = 1.4.0 =
473
 
474
+ - Added support for igbinary
475
+ - Added support for `wp_suspend_cache_addition()`
476
 
477
  = 1.3.9 =
478
 
479
+ - Fixed `WP_REDIS_SHARDS` not showing up in server list
480
+ - Fixed `WP_REDIS_SHARDS` not working when using PECL extension
481
+ - Removed `WP_REDIS_SCHEME` and `WP_REDIS_PATH` leftovers
482
 
483
  = 1.3.8 =
484
 
485
+ - Switched from single file Predis version to full library
486
 
487
  = 1.3.7 =
488
 
489
+ - Revert back to single file Predis version
490
 
491
  = 1.3.6 =
492
 
493
+ - Added support for Redis Sentinel
494
+ - Added support for sharing
495
+ - Switched to PHAR version of Predis
496
+ - Improved diagnostics
497
+ - Added `WP_REDIS_SELECTIVE_FLUSH`
498
+ - Added `$fail_gracefully` parameter to `WP_Object_Cache::__construct()`
499
+ - Always enforce `WP_REDIS_MAXTTL`
500
+ - Pass `$selective` and `$salt` to `redis_object_cache_flush` action
501
+ - Don’t set `WP_CACHE_KEY_SALT` constant
502
 
503
  = 1.3.5 =
504
 
505
+ - Added basic diagnostics to admin interface
506
+ - Added `WP_REDIS_DISABLED` constant to disable cache at runtime
507
+ - Prevent "Invalid plugin header" error
508
+ - Return integer from `increment()` and `decrement()` methods
509
+ - Prevent object cache from being instantiated more than once
510
+ - Always separate cache key `prefix` and `group` by semicolon
511
+ - Improved performance of `build_key()`
512
+ - Only apply `redis_object_cache_get` filter if callbacks have been registered
513
+ - Fixed `add_or_replace()` to only set cache key if it doesn't exist
514
+ - Added `redis_object_cache_flush` action
515
+ - Added `redis_object_cache_enable` action
516
+ - Added `redis_object_cache_disable` action
517
+ - Added `redis_object_cache_update_dropin` action
518
 
519
  = 1.3.4 =
520
 
521
+ - Added WP-CLI support
522
+ - Show host and port unless scheme is unix
523
+ - Updated default global and ignored groups
524
+ - Do a cache flush when activating, deactivating and uninstalling
525
 
526
  = 1.3.3 =
527
 
528
+ - Updated Predis to `v1.1.1`
529
+ - Added `redis_instance()` method
530
+ - Added `incr()` method alias for Batcache compatibility
531
+ - Added `WP_REDIS_GLOBAL_GROUPS` and `WP_REDIS_IGNORED_GROUPS` constant
532
+ - Added `redis_object_cache_delete` action
533
+ - Use `WP_PLUGIN_DIR` with `WP_CONTENT_DIR` as fallback
534
+ - Set password when using a cluster or replication
535
+ - Show Redis client in `stats()`
536
+ - Change visibility of `$cache` to public
537
+ - Use old array syntax, just in case
538
 
539
  = 1.3.2 =
540
 
541
+ - Make sure `$result` is not `false` in `WP_Object_Cache::get()`
542
 
543
  = 1.3.1 =
544
 
545
+ - Fixed connection issue
546
 
547
  = 1.3 =
548
 
549
+ - New admin interface
550
+ - Added support for `wp_cache_get()`'s `$force` and `$found` parameter
551
+ - Added support for clustering and replication with Predis
552
 
553
  = 1.2.3 =
554
 
555
+ - UI improvements
556
 
557
  = 1.2.2 =
558
 
559
+ - Added `redis_object_cache_set` action
560
+ - Added `redis_object_cache_get` action and filter
561
+ - Prevented duplicated admin status messages
562
+ - Load bundled Predis library only if necessary
563
+ - Load bundled Predis library using `WP_CONTENT_DIR` constant
564
+ - Updated `stats()` method output to be uniform with WordPress
565
 
566
  = 1.2.1 =
567
 
568
+ - Added `composer.json`
569
+ - Added deactivation and uninstall hooks to delete `object-cache.php`
570
+ - Added local serialization functions for better `advanced-cache.php` support
571
+ - Updated bundled Predis version to `1.0.3`
572
+ - Updated heading structure to be semantic
573
 
574
  = 1.2 =
575
 
576
+ - Added Multisite support
577
+ - Moved admin menu under _Settings_ menu
578
+ - Fixed PHP notice in `get_redis_client_name()`
579
 
580
  = 1.1.1 =
581
 
582
+ - Call `select()` and optionally `auth()` if HHVM extension is used
583
 
584
  = 1.1 =
585
 
586
+ - Added support for HHVM's Redis extension
587
+ - Added support for PECL Redis extension
588
+ - Added `WP_REDIS_CLIENT` constant, to set preferred Redis client
589
+ - Added `WP_REDIS_MAXTTL` constant, to force expiration of cache keys
590
+ - Improved `add_or_replace()`, `get()`, `set()` and `delete()` methods
591
+ - Improved admin screen styles
592
+ - Removed all internationalization/localization from drop-in
593
 
594
  = 1.0.2 =
595
 
596
+ - Added "Flush Cache" button
597
+ - Added support for UNIX domain sockets
598
+ - Improved cache object retrieval performance significantly
599
+ - Updated bundled Predis library to version `1.0.1`
600
 
601
  = 1.0.1 =
602
 
603
+ - Load plugin translations
604
+ - Hide global admin notices from non-admin users
605
+ - Prevent direct file access to `redis-cache.php` and `admin-page.php`
606
+ - Colorize "Disable Object Cache" button
607
+ - Call `Predis\Client->connect()` to avoid potential uncaught `Predis\Connection\ConnectionException`
608
 
609
  = 1.0 =
610
 
611
+ - Initial release
612
 
613
 
614
  == Upgrade Notice ==
615
 
616
+ = 2.2.1 =
617
 
618
+ New WordPress 6.1 functions, updated Predis to v2.0.3 and various improvements.
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, replication, sentinels, clustering and WP-CLI.
6
- * Version: 2.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, replication, sentinels, clustering and WP-CLI.
6
+ * Version: 2.2.1
7
  * Text Domain: redis-cache
8
  * Domain Path: /languages
9
  * Network: true