UnchangingCacheableDependencyTrait.php in Drupal 8
Same filename and directory in other branches
Namespace
Drupal\Core\CacheFile
core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.phpView 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
Name | Description |
---|---|
UnchangingCacheableDependencyTrait | Trait to implement CacheableDependencyInterface for unchanging objects. |