Updating references to page cache maximum age
parent
8c7ebc0922
commit
ee4f6008d0
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue