mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-02-02 21:07:20 +01:00
RedisCacheDriver.php: flush only the key-value pairs with matching prefix
This commit is contained in:
parent
96a6307ff8
commit
b224bfefdf
@ -45,6 +45,10 @@ class RedisCacheDriver implements CacheDriver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function flush(): void {
|
public function flush(): void {
|
||||||
$this->inner->flushDB();
|
if (empty($this->prefix)) {
|
||||||
|
$this->inner->flushDB();
|
||||||
|
} else {
|
||||||
|
$this->inner->unlink($this->inner->keys("{$this->prefix}*"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user