1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 18:24:57 +02:00
This commit is contained in:
Ryan Cramer
2023-06-02 14:54:21 -04:00
parent e2179a6ec1
commit 3afdc531e0

View File

@@ -176,7 +176,7 @@ class WireCacheDatabase extends Wire implements WireCacheInterface {
*
*/
protected function _deleteAll($expireAll = false) {
$sql = 'DELETE FROM caches WHERE ' . ($expireAll ? 'expires>:never' : 'expires!=:reserved');
$sql = 'DELETE FROM caches WHERE ' . ($expireAll ? 'expires>:expires' : 'expires!=:expires');
$query = $this->wire()->database->prepare($sql, "cache.deleteAll()");
$query->bindValue(':expires', ($expireAll ? WireCache::expireNever : WireCache::expireReserved));
if(!$this->executeQuery($query)) return 0;