trait UnchangingCacheableDependencyTrait in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait
- 9 core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait
Trait to implement CacheableDependencyInterface for unchanging objects.
Hierarchy
- trait \Drupal\Core\Cache\UnchangingCacheableDependencyTrait
See also
\Drupal\Core\Cache\CacheableDependencyInterface
4 files declare their use of UnchangingCacheableDependencyTrait
- BaseFieldDefinition.php in core/
lib/ Drupal/ Core/ Field/ BaseFieldDefinition.php - FieldDefinition.php in core/
lib/ Drupal/ Core/ Field/ FieldDefinition.php - FormattedDateDiff.php in core/
lib/ Drupal/ Core/ Datetime/ FormattedDateDiff.php - HelpSectionPluginBase.php in core/
modules/ help/ src/ Plugin/ HelpSection/ HelpSectionPluginBase.php
File
- core/
lib/ Drupal/ Core/ Cache/ UnchangingCacheableDependencyTrait.php, line 10
Namespace
Drupal\Core\CacheView source
trait UnchangingCacheableDependencyTrait {
/**
* {@inheritdoc}
*/
public function getCacheContexts() {
return [];
}
/**
* {@inheritdoc}
*/
public function getCacheTags() {
return [];
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
return Cache::PERMANENT;
}
}