From 7f10bb0ffb5d1691f44826a5084dc8369ae2c471 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 23 Nov 2010 13:37:34 -0700 Subject: [PATCH] Allow theme cache lifetime to be configured --- framework/Core/lib/Horde/Core/Factory/ThemesCache.php | 4 ++-- horde/config/conf.xml | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/framework/Core/lib/Horde/Core/Factory/ThemesCache.php b/framework/Core/lib/Horde/Core/Factory/ThemesCache.php index e90f86e51..d6bbab465 100644 --- a/framework/Core/lib/Horde/Core/Factory/ThemesCache.php +++ b/framework/Core/lib/Horde/Core/Factory/ThemesCache.php @@ -72,7 +72,7 @@ class Horde_Core_Factory_ThemesCache $instance = new Horde_Themes_Cache($app, $theme); } else { try { - $instance = @unserialize($cache->get($sig, 86400)); + $instance = @unserialize($cache->get($sig, $GLOBALS['conf']['cachethemesparams']['lifetime'])); } catch (Exception $e) { $instance = null; } @@ -102,7 +102,7 @@ class Horde_Core_Factory_ThemesCache foreach ($this->_instances as $key => $val) { if ($val->changed) { - $cache->set($key, serialize($val), 86400); + $cache->set($key, serialize($val), $GLOBALS['conf']['cachethemesparams']['lifetime']); } } } diff --git a/horde/config/conf.xml b/horde/config/conf.xml index ade0b177f..e2de2fdff 100644 --- a/horde/config/conf.xml +++ b/horde/config/conf.xml @@ -1084,7 +1084,7 @@ directory on the web frontend. - + <strong>Requires a configured Horde caching backend.</strong> @@ -1126,7 +1126,7 @@ directory on the web frontend. - + <strong>Requires a configured Horde caching backend.</strong> @@ -1166,12 +1166,15 @@ is HIGHLY RECOMMENDED. <strong>Requires a configured Horde caching backend.</strong> - false - - false - true - - + false + + + + 604800 + + + -- 2.11.0