Release lock when deleting cache key
authorMatthew Wire <mjw@mjwconsult.co.uk>
Sun, 29 May 2022 16:00:51 +0000 (17:00 +0100)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Sun, 29 May 2022 16:00:51 +0000 (17:00 +0100)
CRM/Utils/Cache/SqlGroup.php

index 84618bd26358d589a0ed12e407f28668a8cf9803..97df20cb12745b62569389eeb68e0f375c2297f4 100644 (file)
@@ -115,7 +115,9 @@ class CRM_Utils_Cache_SqlGroup implements CRM_Utils_Cache_Interface {
     }
 
     if (is_int($ttl) && $ttl <= 0) {
-      return $this->delete($key);
+      $result = $this->delete($key);
+      $lock->release();
+      return $result;
     }
 
     $dataExists = CRM_Core_DAO::singleValueQuery("SELECT COUNT(*) FROM {$this->table} WHERE {$this->where($key)}");