protected RenderCache::maxAgeToExpire($max_age)
Maps a #cache[max-age] value to an "expire" value for the Cache API.
int $max_age: A #cache[max-age] value.
int A corresponding "expire" value.
\Drupal\Core\Cache\CacheBackendInterface::set()
protected function maxAgeToExpire($max_age) { return ($max_age === Cache::PERMANENT) ? Cache::PERMANENT : (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME') + $max_age; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!RenderCache.php/function/RenderCache::maxAgeToExpire/8.1.x