From 71dd34a50b23e046e6e9f90f66df39b40c5370c6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 23 Nov 2010 11:35:37 -0700 Subject: [PATCH] Add ability to disable theme caching --- framework/Core/lib/Horde/Core/Factory/ThemesBuild.php | 7 +++++-- horde/config/conf.xml | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/framework/Core/lib/Horde/Core/Factory/ThemesBuild.php b/framework/Core/lib/Horde/Core/Factory/ThemesBuild.php index c57135fca..f184d28b1 100644 --- a/framework/Core/lib/Horde/Core/Factory/ThemesBuild.php +++ b/framework/Core/lib/Horde/Core/Factory/ThemesBuild.php @@ -74,8 +74,11 @@ class Horde_Core_Factory_ThemesBuild return $this->_instances[$sig]; } - $cache = $this->_injector->getInstance('Horde_Cache'); - if ($cache instanceof Horde_Cache_Null) { + if (!empty($GLOBALS['conf']['cachethemes'])) { + $cache = $this->_injector->getInstance('Horde_Cache'); + } + + if (!$cache || ($cache instanceof Horde_Cache_Null)) { $instance = new Horde_Themes_Build($app, $theme); } else { $id = $sig . '|' . $GLOBALS['registry']->getVersion($app); diff --git a/horde/config/conf.xml b/horde/config/conf.xml index 3af806dae..ade0b177f 100644 --- a/horde/config/conf.xml +++ b/horde/config/conf.xml @@ -1158,6 +1158,20 @@ + + Theme Caching + + Theme caching optimizes display of themed elements. Caching reduces + server load (specifically by dramatically reducing filesystem access), and + is HIGHLY RECOMMENDED. <strong>Requires a configured Horde caching + backend.</strong> + + false + + false + true + + -- 2.11.0