UrlCacheContext.php in Zircon Profile 8.0
File
core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php
View source
<?php
namespace Drupal\Core\Cache\Context;
use Drupal\Core\Cache\CacheableMetadata;
class UrlCacheContext extends RequestStackCacheContextBase implements CacheContextInterface {
public static function getLabel() {
return t('URL');
}
public function getContext() {
return $this->requestStack
->getCurrentRequest()
->getUri();
}
public function getCacheableMetadata() {
return new CacheableMetadata();
}
}