UnchangingCacheableDependencyTrait.php
Same filename in other branches
Namespace
Drupal\Core\CacheFile
-
core/
lib/ Drupal/ Core/ Cache/ UnchangingCacheableDependencyTrait.php
View source
<?php
namespace Drupal\Core\Cache;
/**
* Trait to implement CacheableDependencyInterface for unchanging objects.
*
* @see \Drupal\Core\Cache\CacheableDependencyInterface
*/
trait UnchangingCacheableDependencyTrait {
/**
* {@inheritdoc}
*/
public function getCacheContexts() {
return [];
}
/**
* {@inheritdoc}
*/
public function getCacheTags() {
return [];
}
/**
* {@inheritdoc}
*/
public function getCacheMaxAge() {
return Cache::PERMANENT;
}
}
Traits
Title | Deprecated | Summary |
---|---|---|
UnchangingCacheableDependencyTrait | Trait to implement CacheableDependencyInterface for unchanging objects. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.