W3cubDocs

/Drupal 8

public function AliasManager::cacheClear

public AliasManager::cacheClear($source = NULL)

Clear internal caches in alias manager.

Parameters

$source: Source path of the alias that is being inserted/updated. Can be omitted if entire cache needs to be flushed.

Overrides AliasManagerInterface::cacheClear

File

core/lib/Drupal/Core/Path/AliasManager.php, line 254

Class

AliasManager
The default alias manager implementation.

Namespace

Drupal\Core\Path

Code

public function cacheClear($source = NULL) {
  if ($source) {
    foreach (array_keys($this->lookupMap) as $lang) {
      unset($this->lookupMap[$lang][$source]);
    }
  }
  else {
    $this->lookupMap = array();
  }
  $this->noPath = array();
  $this->noAlias = array();
  $this->langcodePreloaded = array();
  $this->preloadedPathLookups = array();
  $this->cache->delete($this->cacheKey);
  $this->pathAliasWhitelistRebuild($source);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Path!AliasManager.php/function/AliasManager::cacheClear/8.1.x