Skip to content

Commit c324e57

Browse files
authored
Fix 'DEL' command in Cache::flushValues() when $shareDatabase is enabled. (#202, #202)
1 parent a520699 commit c324e57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Cache.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ protected function flushValues()
351351
do {
352352
list($cursor, $keys) = $this->redis->scan($cursor, 'MATCH', $this->keyPrefix . '*');
353353
$cursor = (int) $cursor;
354-
$this->redis->executeCommand('DEL', $keys);
354+
if (!empty($keys)) {
355+
$this->redis->executeCommand('DEL', $keys);
356+
}
355357
} while ($cursor !== 0);
356358

357359
return true;

0 commit comments

Comments
 (0)