3 namespace Drupal\Core\Cache\Context;
5 use Drupal\Core\Cache\CacheableMetadata;
8 * Defines the UserCacheContext service, for "per user" caching.
10 * Cache context ID: 'user'.
12 class UserCacheContext extends UserCacheContextBase implements CacheContextInterface {
17 public static function getLabel() {
24 public function getContext() {
25 return $this->user->id();
31 public function getCacheableMetadata() {
32 return new CacheableMetadata();