protected function getRouteCollectionCacheId(Request
$request) { // Include the current language code in the cache identifier as
// the language information can be elsewhere than in the path, for example
// based on the domain.
$this->
addExtraCacheKeyPart('language',
$this->
getCurrentLanguageCacheIdPart());
// Sort the cache key parts by their provider in order to have predictable
// cache keys.
ksort($this->extraCacheKeyParts
);
$key_parts =
[];
foreach ($this->extraCacheKeyParts
as $provider =>
$key_part) { $key_parts[] = '[' .
$provider . ']=' .
$key_part;
} return 'route:' .
implode(':',
$key_parts) . ':' .
$request->
getPathInfo() . ':' .
$request->
getQueryString();
}