mirror of
https://github.com/symfony/cache.git
synced 2026-03-23 23:22:07 +01:00
[Cache] Fix clear() when using Predis
This commit is contained in:
@@ -492,7 +492,7 @@ trait RedisTrait
|
||||
|
||||
$cursor = null;
|
||||
do {
|
||||
$keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000);
|
||||
$keys = $host instanceof \Predis\ClientInterface ? $host->scan($cursor ?? 0, 'MATCH', $pattern, 'COUNT', 1000) : $host->scan($cursor, $pattern, 1000);
|
||||
if (isset($keys[1]) && \is_array($keys[1])) {
|
||||
$cursor = $keys[0];
|
||||
$keys = $keys[1];
|
||||
|
||||
Reference in New Issue
Block a user