You are here

public function AliasWhitelist::resolveCacheMiss in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Path/AliasWhitelist.php \Drupal\Core\Path\AliasWhitelist::resolveCacheMiss()

Resolves a cache miss.

When an offset is not found in the object, this is treated as a cache miss. This method allows classes using this implementation to look up the actual value and allow it to be cached.

Parameters

string $key: The offset that was requested.

Return value

mixed The value of the offset, or NULL if no value was found.

Overrides CacheCollector::resolveCacheMiss

1 call to AliasWhitelist::resolveCacheMiss()
AliasWhitelist::get in core/lib/Drupal/Core/Path/AliasWhitelist.php
Gets value from the cache.

File

core/lib/Drupal/Core/Path/AliasWhitelist.php, line 108
Contains \Drupal\Core\Path\AliasWhitelist.

Class

AliasWhitelist
Extends CacheCollector to build the path alias whitelist over time.

Namespace

Drupal\Core\Path

Code

public function resolveCacheMiss($root) {
  $exists = $this->aliasStorage
    ->pathHasMatchingAlias('/' . $root);
  $this->storage[$root] = $exists;
  $this
    ->persist($root);
  if ($exists) {
    return TRUE;
  }
}