function UnchangingCacheableDependencyTrait::getCacheMaxAge

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait::getCacheMaxAge()
  2. 8.9.x core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait::getCacheMaxAge()
  3. 10 core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php \Drupal\Core\Cache\UnchangingCacheableDependencyTrait::getCacheMaxAge()
3 methods override UnchangingCacheableDependencyTrait::getCacheMaxAge()
FormattedDateDiff::getCacheMaxAge in core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
HelpTopicSection::getCacheMaxAge in core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php
TourHelpSection::getCacheMaxAge in core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php

File

core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php, line 29

Class

UnchangingCacheableDependencyTrait
Trait to implement CacheableDependencyInterface for unchanging objects.

Namespace

Drupal\Core\Cache

Code

public function getCacheMaxAge() {
    return Cache::PERMANENT;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.