public function AccessResultCache::setAccessResultsCache in Permissions by Term 8.2
File
- src/
Cache/ AccessResultCache.php, line 23
Class
Namespace
Drupal\permissions_by_term\CacheCode
public function setAccessResultsCache(int $accountId, $entityId, AccessResult $accessResult) : void {
$data = \serialize($accessResult);
$cid = 'permissions_by_term:access_result_cache:' . $entityId . ':' . $accountId;
$tags = [
'permissions_by_term:access_result_cache:' . $entityId . ':' . $accountId,
'permissions_by_term:access_result_cache:' . $entityId,
'permissions_by_term:access_result_cache',
];
$tags = Cache::mergeTags($tags, [
$cid,
]);
$this->cache
->set($cid, $data, Cache::PERMANENT, $tags);
$staticCache =& drupal_static(__FUNCTION__ . $cid, NULL);
$staticCache = $data;
}