function AliasPrefixList::lazyLoadCache
Overrides CacheCollector::lazyLoadCache
1 call to AliasPrefixList::lazyLoadCache()
- AliasPrefixList::get in core/
modules/ path_alias/ src/ AliasPrefixList.php
File
-
core/
modules/ path_alias/ src/ AliasPrefixList.php, line 52
Class
- AliasPrefixList
- Cache a list of valid alias prefixes.
Namespace
Drupal\path_aliasCode
protected function lazyLoadCache() {
parent::lazyLoadCache();
// On a cold start $this->storage will be empty and the prefix list will
// need to be rebuilt from scratch. The prefix list 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();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.