Tries to retrieve a previously cached access value from the static cache.
\Drupal\Core\Entity\EntityInterface $entity: The entity for which to check 'create' access.
string $operation: The entity operation. Usually one of 'view', 'edit', 'create' or 'delete'.
string $langcode: The language code for which to check access.
\Drupal\Core\Session\AccountInterface $account: The user for which to check access.
bool|null TRUE if access was granted, FALSE if access was denied and NULL if there is no record for the given user, operation, langcode and entity in the cache.
protected function getCache(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
$uid = $account ? $account
->id() : 0;
$uuid = $entity
->uuid();
// Return from cache if a value has been set for it previously.
if (isset($this->accessCache[$uid][$uuid][$langcode][$operation])) {
return $this->accessCache[$uid][$uuid][$langcode][$operation];
}
}