You are here

public function RouteProvider::addExtraCacheKeyPart in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::addExtraCacheKeyPart()

Adds a cache key part to be used in the cache ID of the route collection.

Parameters

string $cache_key_provider: The provider of the cache key part.

string $cache_key_part: A string to be used as a cache key part.

Overrides CacheableRouteProviderInterface::addExtraCacheKeyPart

1 call to RouteProvider::addExtraCacheKeyPart()
RouteProvider::getRouteCollectionCacheId in core/lib/Drupal/Core/Routing/RouteProvider.php
Returns the cache ID for the route collection cache.

File

core/lib/Drupal/Core/Routing/RouteProvider.php, line 488

Class

RouteProvider
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function addExtraCacheKeyPart($cache_key_provider, $cache_key_part) {
  $this->extraCacheKeyParts[$cache_key_provider] = $cache_key_part;
}