Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SessionCacheContext.php

function SessionCacheContext::getContext

File

core/lib/Drupal/Core/Cache/Context/SessionCacheContext.php, line 24

Class

SessionCacheContext
Defines the SessionCacheContext service, for "per session" caching.

Namespace

Drupal\Core\Cache\Context

Code

public function getContext() {
    return Crypt::hashBase64($this->requestStack
        ->getSession()
        ->getId());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal