3 namespace Drupal\Core\Cache\Context;
5 use Drupal\Core\Session\AccountInterface;
8 * Base class for user-based cache contexts.
10 * Subclasses need to implement either
11 * \Drupal\Core\Cache\Context\CacheContextInterface or
12 * \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.
14 abstract class UserCacheContextBase {
19 * @var \Drupal\Core\Session\AccountInterface
24 * Constructs a new UserCacheContextBase class.
26 * @param \Drupal\Core\Session\AccountInterface $user
29 public function __construct(AccountInterface $user) {