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
Redis::wipeStorage() method does not work, I add some debug statements to get keys before wiping and after wiping and keys still exists, here is the method with debug statements
public function wipeStorage(): void
{
$this->ensureOpenConnection();
$searchPattern = "";
$globalPrefix = $this->redis->getOption(\Redis::OPT_PREFIX);
// @phpstan-ignore-next-line false positive, phpstan thinks getOptions returns int
if (is_string($globalPrefix)) {
$searchPattern .= $globalPrefix;
}
$searchPattern .= self::$prefix;
$searchPattern .= '*';
dump($this->redis->keys($searchPattern));
$this->redis->eval(
<<<LUA
local cursor = "0"
repeat
local results = redis.call('SCAN', cursor, 'MATCH', ARGV[1])
cursor = results[1]
for _, key in ipairs(results[2]) do
redis.call('DEL', key)
end
until cursor == "0"
LUA
,
[$searchPattern],
0
);
dump($this->redis->keys($searchPattern));
}
library verstion v2.7.1
Redis version 3.2
Redis::wipeStorage()
method does not work, I add some debug statements to get keys before wiping and after wiping and keys still exists, here is the method with debug statementsso before the eval is called debug return output:
and after eval dump output is identical, so nothing is deleted
The text was updated successfully, but these errors were encountered: