Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UnchangingCacheableDependencyTrait.php

function UnchangingCacheableDependencyTrait::getCacheMaxAge

2 methods override UnchangingCacheableDependencyTrait::getCacheMaxAge()
FormattedDateDiff::getCacheMaxAge in core/lib/Drupal/Core/Datetime/FormattedDateDiff.php
The maximum age for which this object may be cached.
HelpTopicSection::getCacheMaxAge in core/modules/help/src/Plugin/HelpSection/HelpTopicSection.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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal