From 19147e43c5a9a2ec05c66d7a43446c051b4c0307 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Mon, 8 Apr 2013 16:57:58 +1000 Subject: [PATCH] [#1964132] Provide ability to use cache_lifetime variable for authcache expiry --- authcache.helpers.inc | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/authcache.helpers.inc b/authcache.helpers.inc index a10916a..acfc536 100644 --- a/authcache.helpers.inc +++ b/authcache.helpers.inc @@ -363,6 +363,9 @@ function _authcache_shutdown_save_page() { return; } + // To use Drupal's cache_lifetime for authcache's expiry, set + // $conf['authcache_min_lifetime'] = TRUE in settings.php + $min_lifetime = variable_get('cache_lifetime', 0) + REQUEST_TIME; $cache = (object) array( 'cid' => $key, 'data' => array( @@ -371,7 +374,7 @@ function _authcache_shutdown_save_page() { 'title' => drupal_get_title(), 'headers' => array(), ), - 'expire' => CACHE_TEMPORARY, + 'expire' => (variable_get('authcache_min_lifetime', FALSE)) ? $min_lifetime : CACHE_TEMPORARY, 'created' => REQUEST_TIME, ); -- 1.7.7.5 (Apple Git-26)