Ejemplo n.º 1
0
 static function deleteGroup($group = null)
 {
     $dao = new CRM_Core_DAO_Cache();
     if (!empty($group)) {
         $dao->group_name = $group;
     }
     $dao->delete();
     // also reset ACL Cache
     require_once 'CRM/ACL/BAO/Cache.php';
     CRM_ACL_BAO_Cache::resetCache();
 }
Ejemplo n.º 2
0
 /**
  * Delete all the cache elements that belong to a group OR delete the entire cache if group is not specified.
  *
  * @param string $group
  *   The group name of the entries to be deleted.
  * @param string $path
  *   Path of the item that needs to be deleted.
  * @param bool $clearAll clear all caches
  */
 public static function deleteGroup($group = NULL, $path = NULL, $clearAll = TRUE)
 {
     $dao = new CRM_Core_DAO_Cache();
     if (!empty($group)) {
         $dao->group_name = $group;
     }
     if (!empty($path)) {
         $dao->path = $path;
     }
     $dao->delete();
     if ($clearAll) {
         // also reset ACL Cache
         CRM_ACL_BAO_Cache::resetCache();
         // also reset memory cache if any
         CRM_Utils_System::flushCache();
     }
 }