From: Michael M Slusarz Date: Tue, 23 Nov 2010 18:35:37 +0000 (-0700) Subject: Add ability to disable theme caching X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=71dd34a50b23e046e6e9f90f66df39b40c5370c6;p=horde.git Add ability to disable theme caching --- 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 + +