Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AliasManager.php

function AliasManager::cacheClear

File

core/modules/path_alias/src/AliasManager.php, line 216

Class

AliasManager
The default alias manager implementation.

Namespace

Drupal\path_alias

Code

public function cacheClear($source = NULL) {
    // Note this method does not flush the preloaded path lookup cache. This is
    // because if a path is missing from this cache, it still results in the
    // alias being loaded correctly, only less efficiently.
    if ($source) {
        foreach (array_keys($this->lookupMap) as $lang) {
            unset($this->lookupMap[$lang][$source]);
        }
    }
    else {
        $this->lookupMap = [];
    }
    $this->noPath = [];
    $this->noAlias = [];
    $this->langcodePreloaded = [];
    $this->preloadedPathLookups = [];
    $this->pathAliasPrefixListRebuild($source);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal