public function KeyValueCache::has in Permissions by Term 8.2
File
- src/
Cache/ KeyValueCache.php, line 58
Class
Namespace
Drupal\permissions_by_term\CacheCode
public function has() : bool {
$cid = 'permissions_by_term:key_value_cache';
$staticCache =& drupal_static(__FUNCTION__ . $cid, NULL);
if ($staticCache) {
$data = $staticCache;
if (!is_array($data)) {
return FALSE;
}
return TRUE;
}
$result = $this->cache
->get($cid);
if (!isset($result->data)) {
return FALSE;
}
$data = $result->data;
if (!is_array($data)) {
return FALSE;
}
return TRUE;
}