1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-02 12:57:35 +01:00

RedisCacheDriver.php: flush only the key-value pairs with matching prefix

This commit is contained in:
Zankaria 2024-10-28 22:56:27 +01:00
parent 96a6307ff8
commit b224bfefdf

View File

@ -45,6 +45,10 @@ class RedisCacheDriver implements CacheDriver {
}
public function flush(): void {
if (empty($this->prefix)) {
$this->inner->flushDB();
} else {
$this->inner->unlink($this->inner->keys("{$this->prefix}*"));
}
}
}