You are here

trait UnchangingCacheableDependencyTrait in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait

Trait to implement CacheableDependencyInterface for unchanging objects.

Hierarchy

See also

\Drupal\Core\Cache\CacheableDependencyInterface

1 file declares its use of UnchangingCacheableDependencyTrait
BaseFieldDefinition.php in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Contains \Drupal\Core\Field\BaseFieldDefinition.

File

core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php, line 15
Contains \Drupal\Core\Cache\UnchangingCacheableDependencyTrait.

Namespace

Drupal\Core\Cache
View source
trait UnchangingCacheableDependencyTrait {

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts() {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheMaxAge() {
    return Cache::PERMANENT;
  }

}

Members