Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php
- 9 core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php
Namespace
Drupal\Core\Cache\Context
File
core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php
View source
<?php
namespace Drupal\Core\Cache\Context;
use Drupal\Component\Utility\Crypt;
class SessionCacheContext extends RequestStackCacheContextBase {
public static function getLabel() {
return t('Session');
}
public function getContext() {
return Crypt::hashBase64($this->requestStack
->getSession()
->getId());
}
}
Classes