Updating references to page cache maximum age

8.0.x
Greg Dunlap 2011-12-07 22:11:51 +01:00
parent 8c7ebc0922
commit ee4f6008d0
1 changed files with 2 additions and 1 deletions

View File

@ -1350,7 +1350,8 @@ function drupal_serve_page_from_cache(stdClass $cache) {
// max-age > 0, allowing the page to be cached by external proxies, when a
// session cookie is present unless the Vary header has been replaced or
// unset in hook_boot().
$max_age = !isset($_COOKIE[session_name()]) || isset($hook_boot_headers['vary']) ? variable_get('page_cache_maximum_age', 0) : 0;
$config = config('system.performance');
$max_age = !isset($_COOKIE[session_name()]) || isset($hook_boot_headers['vary']) ? $config->get('page_cache_maximum_age') : 0;
$default_headers['Cache-Control'] = 'public, max-age=' . $max_age;
// Entity tag should change if the output changes.