From f1361c7059c53e66dda5fedde19f6c2b7797d045 Mon Sep 17 00:00:00 2001 From: Muppetteer Date: Mon, 24 Aug 2015 14:44:18 +1000 Subject: [PATCH] Fix broken Pressflow page cache lifetime Fix broken Pressflow page cache lifetime due to use of non-existant config variable, and incorrectly treating it as a timestamp. --- includes/common.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/common.inc b/includes/common.inc index 64a185dc95b..b16bcf17484 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2752,7 +2752,7 @@ function page_set_cache() { // This will fail in some cases, see page_get_cache() for the explanation. if ($data = ob_get_contents()) { ob_end_clean(); - $cache_lifetime = variable_get('page_cache_lifetime', 0); + $cache_lifetime = variable_get('cache_lifetime', 0); if (variable_get('page_compression', TRUE) && extension_loaded('zlib')) { $data = gzencode($data, 9, FORCE_GZIP); @@ -2761,7 +2761,7 @@ function page_set_cache() { $cache = (object) array( 'cid' => $base_root . request_uri(), 'data' => $data, - 'expire' => $cache_lifetime > 0 ? $cache_lifetime : CACHE_TEMPORARY, + 'expire' => $cache_lifetime > 0 ? $_SERVER['REQUEST_TIME'] + $cache_lifetime : CACHE_TEMPORARY, 'created' => $_SERVER['REQUEST_TIME'], 'headers' => array(), );