You are here

public function CurrencyCacheContext::getContext in Commerce Currency Resolver 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 CacheContextInterface::getContext

File

src/Cache/Context/CurrencyCacheContext.php, line 43

Class

CurrencyCacheContext
Defines the CurrencyCacheContext service, for "per currency" caching.

Namespace

Drupal\commerce_currency_resolver\Cache\Context

Code

public function getContext() {
  return $this->currentCurrency
    ->getCurrency();
}