function CachePluginBase::getDefaultCacheMaxAge

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::getDefaultCacheMaxAge()
  2. 10 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::getDefaultCacheMaxAge()
  3. 11.x core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::getDefaultCacheMaxAge()

Returns the default cache max age.

1 call to CachePluginBase::getDefaultCacheMaxAge()
CachePluginBase::getCacheMaxAge in core/modules/views/src/Plugin/views/cache/CachePluginBase.php
Gets the max age for the current view.
2 methods override CachePluginBase::getDefaultCacheMaxAge()
Tag::getDefaultCacheMaxAge in core/modules/views/src/Plugin/views/cache/Tag.php
Returns the default cache max age.
Time::getDefaultCacheMaxAge in core/modules/views/src/Plugin/views/cache/Time.php
Returns the default cache max age.

File

core/modules/views/src/Plugin/views/cache/CachePluginBase.php, line 269

Class

CachePluginBase
The base plugin to handle caching.

Namespace

Drupal\views\Plugin\views\cache

Code

protected function getDefaultCacheMaxAge() {
    // The default cache backend is not caching anything.
    return 0;
}

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