You are here

public function SecureLoginCacheContext::getContext in Secure Login 8

Returns the string representation of the cache context.

A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method.

Return value

string The string representation of the cache context.

Overrides UrlCacheContext::getContext

File

src/SecureLoginCacheContext.php, line 24

Class

SecureLoginCacheContext
Defines the SecureLoginCacheContext service for "per request URL" caching.

Namespace

Drupal\securelogin

Code

public function getContext() {
  return $this->requestStack
    ->getMasterRequest()
    ->getUri();
}