You are here

public function KeyValueCache::set in Permissions by Term 8.2

File

src/Cache/KeyValueCache.php, line 23

Class

KeyValueCache

Namespace

Drupal\permissions_by_term\Cache

Code

public function set(array $data) : void {
  $cid = 'permissions_by_term:key_value_cache';
  $tags = [
    'permissions_by_term:key_value_cache',
  ];
  $tags = Cache::mergeTags($tags, [
    $cid,
  ]);
  $this->cache
    ->set($cid, $data, Cache::PERMANENT, $tags);
  $staticCache =& drupal_static(__FUNCTION__ . $cid, NULL);
  $staticCache = $data;
}