protected function RenderCache::maxAgeToExpire in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Render/RenderCache.php \Drupal\Core\Render\RenderCache::maxAgeToExpire()
Maps a #cache[max-age] value to an "expire" value for the Cache API.
Parameters
int $max_age: A #cache[max-age] value.
Return value
int A corresponding "expire" value.
See also
\Drupal\Core\Cache\CacheBackendInterface::set()
1 call to RenderCache::maxAgeToExpire()
- RenderCache::set in core/
lib/ Drupal/ Core/ Render/ RenderCache.php - Caches the rendered output of a renderable array.
File
- core/
lib/ Drupal/ Core/ Render/ RenderCache.php, line 289 - Contains \Drupal\Core\Render\RenderCache.
Class
- RenderCache
- Wraps the caching logic for the render caching system.
Namespace
Drupal\Core\RenderCode
protected function maxAgeToExpire($max_age) {
return $max_age === Cache::PERMANENT ? Cache::PERMANENT : (int) $this->requestStack
->getMasterRequest()->server
->get('REQUEST_TIME') + $max_age;
}