protected function AliasWhitelist::lazyLoadCache in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Path/AliasWhitelist.php \Drupal\Core\Path\AliasWhitelist::lazyLoadCache()
Loads the cache if not already done.
Overrides CacheCollector::lazyLoadCache
1 call to AliasWhitelist::lazyLoadCache()
- AliasWhitelist::get in core/
lib/ Drupal/ Core/ Path/ AliasWhitelist.php - Gets value from the cache.
File
- core/
lib/ Drupal/ Core/ Path/ AliasWhitelist.php, line 57 - Contains \Drupal\Core\Path\AliasWhitelist.
Class
- AliasWhitelist
- Extends CacheCollector to build the path alias whitelist over time.
Namespace
Drupal\Core\PathCode
protected function lazyLoadCache() {
parent::lazyLoadCache();
// On a cold start $this->storage will be empty and the whitelist will
// need to be rebuilt from scratch. The whitelist is initialized from the
// list of all valid path roots stored in the 'router.path_roots' state,
// with values initialized to NULL. During the request, each path requested
// that matches one of these keys will be looked up and the array value set
// to either TRUE or FALSE. This ensures that paths which do not exist in
// the router are not looked up, and that paths that do exist in the router
// are only looked up once.
if (empty($this->storage)) {
$this
->loadMenuPathRoots();
}
}