static $_cache = NULL;
+ /**
+ * @param $id
+ *
+ * @return mixed
+ */
static function &build($id) {
if (!self::$_cache) {
self::$_cache = array();
return self::$_cache[$id];
}
+ /**
+ * @param $id
+ *
+ * @return array
+ */
static function retrieve($id) {
$query = "
SELECT acl_id
return $cache;
}
+ /**
+ * @param $id
+ * @param $cache
+ */
static function store($id, &$cache) {
foreach ($cache as $aclID => $data) {
$dao = new CRM_ACL_DAO_Cache();
}
}
+ /**
+ * @param $id
+ */
static function deleteEntry($id) {
if (self::$_cache &&
array_key_exists($id, self::$_cache)
CRM_Core_DAO::executeQuery($query, $params);
}
+ /**
+ * @param $id
+ */
static function updateEntry($id) {
// rebuilds civicrm_acl_cache
self::deleteEntry($id);