CRM-12321 - CRM_Core_BAO_Cache::setItem - Cache coherency
authorTim Otten <totten@civicrm.org>
Mon, 24 Jun 2013 08:36:53 +0000 (04:36 -0400)
committerTim Otten <totten@civicrm.org>
Mon, 24 Jun 2013 10:29:37 +0000 (06:29 -0400)
CRM/Core/BAO/Cache.php

index 9ebb4ca98f5151136d2626cc50434c18926623cd..f73169c18bee66ddbbaddcd63588241c15912fd2 100644 (file)
@@ -169,11 +169,15 @@ class CRM_Core_BAO_Cache extends CRM_Core_DAO_Cache {
 
     $dao->free();
 
-    // set the cache in memory
+    // cache coherency - refresh or remove dependent caches
+
     $argString = "CRM_CT_{$group}_{$path}_{$componentID}";
     $cache = CRM_Utils_Cache::singleton();
     $data = unserialize($dao->data);
     $cache->set($argString, $data);
+
+    $argString = "CRM_CT_CI_{$group}_{$componentID}";
+    $cache->delete($argString);
   }
 
   /**