function WorkspacesAliasManager::setCacheKey

Same name in other branches
  1. 10 core/modules/workspaces/src/WorkspacesAliasManager.php \Drupal\workspaces\WorkspacesAliasManager::setCacheKey()

File

core/modules/workspaces/src/WorkspacesAliasManager.php, line 24

Class

WorkspacesAliasManager
Decorates the path_alias.manager service for workspace-specific caching.

Namespace

Drupal\workspaces

Code

public function setCacheKey($key) : void {
    if ($this->workspaceManager
        ->hasActiveWorkspace()) {
        $key = $this->workspaceManager
            ->getActiveWorkspace()
            ->id() . ':' . $key;
    }
    $this->inner
        ->setCacheKey($key);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.