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);
}
doc_Drupal
2016-10-29 08:44:09
Comments
Leave a Comment

Please login to continue.