function CachePluginBase::cacheSetMaxAge
Same name in other branches
- 9 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::cacheSetMaxAge()
- 8.9.x core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::cacheSetMaxAge()
- 10 core/modules/views/src/Plugin/views/cache/CachePluginBase.php \Drupal\views\Plugin\views\cache\CachePluginBase::cacheSetMaxAge()
Determines cache expiration time based on its type.
Plugins must override this to implement expiration in the cache table.
Parameters
string $type: The cache type.
Return value
int Either an offset from the request time to indicate when the cache expires, or \Drupal\Core\Cache\Cache::PERMANENT to indicate that the cache does not expire. Defaults to \Drupal\Core\Cache\Cache::PERMANENT.
1 call to CachePluginBase::cacheSetMaxAge()
- CachePluginBase::cacheSet in core/
modules/ views/ src/ Plugin/ views/ cache/ CachePluginBase.php - Save data to the cache.
1 method overrides CachePluginBase::cacheSetMaxAge()
- Time::cacheSetMaxAge in core/
modules/ views/ src/ Plugin/ views/ cache/ Time.php
File
-
core/
modules/ views/ src/ Plugin/ views/ cache/ CachePluginBase.php, line 97
Class
- CachePluginBase
- The base plugin to handle caching.
Namespace
Drupal\views\Plugin\views\cacheCode
protected function cacheSetMaxAge($type) {
return Cache::PERMANENT;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.