class StaticCacheContext in GraphQL 8.4
Helper class, not sure for what.
@todo This class and service seems unused, can we remove it?
Hierarchy
- class \Drupal\graphql\Cache\Context\StaticCacheContext implements CalculatedCacheContextInterface
Expanded class hierarchy of StaticCacheContext
1 string reference to 'StaticCacheContext'
1 service uses StaticCacheContext
File
- src/
Cache/ Context/ StaticCacheContext.php, line 13
Namespace
Drupal\graphql\Cache\ContextView source
class StaticCacheContext implements CalculatedCacheContextInterface {
/**
* {@inheritdoc}
*/
public static function getLabel() {
return t('Static');
}
/**
* {@inheritdoc}
*/
public function getContext($parameter = NULL) {
return $parameter ?: '';
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($parameter = NULL) {
return new CacheableMetadata();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
StaticCacheContext:: |
public | function |
Gets the cacheability metadata for the context based on the parameter value. Overrides CalculatedCacheContextInterface:: |
|
StaticCacheContext:: |
public | function |
Returns the string representation of the cache context. Overrides CalculatedCacheContextInterface:: |
|
StaticCacheContext:: |
public static | function |
Returns the label of the cache context. Overrides CalculatedCacheContextInterface:: |