You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!version_compare($info['redis_version'], '2.8', '>=')) {
194
202
// As documented in Redis documentation (http://redis.io/commands/keys) using KEYS
195
203
// can hang your server when it is executed against large databases (millions of items).
196
-
// Whenever you hit this scale, it is advised to deploy one Redis database per cache pool
197
-
// instead of using namespaces, so that FLUSHDB is used instead.
198
-
$host->eval("local keys=redis.call('KEYS',ARGV[1]..'*') for i=1,#keys,5000 do redis.call('DEL',unpack(keys,i,math.min(i+4999,#keys))) end", $evalArgs[0], $evalArgs[1]);
204
+
// Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above.
205
+
$cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]..'*') for i=1,#keys,5000 do redis.call('DEL',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $evalArgs[0], $evalArgs[1]) && $cleared;
0 commit comments