Add config option to disable caching.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 22 Jan 2009 14:01:36 +0000 (07:01 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 22 Jan 2009 14:01:36 +0000 (07:01 -0700)
chora/config/conf.xml
chora/docs/CHANGES
chora/lib/base.php

index 6da82c6..b4260a2 100644 (file)
   </configenum>
  </configtab>
 
+ <configtab name="cache" desc="Caching">
+  <configboolean name="caching" desc="Allow caching of views? This requires
+  that a caching backend be configured in Horde.">false</configboolean>
+ </configtab>
+
  <configtab name="menu" desc="Menu Settings">
   <configsection name="menu">
    <configheader>Menu Settings</configheader>
index 665bdf3..fe37b9a 100644 (file)
@@ -2,6 +2,7 @@
 v3.0-git
 --------
 
+[mms] Add configuration option to disable caching.
 [mms] Move log entries in annotate screen to an AJAX request.
 [mms] Add support for git repositories.
 
index baca733..f055d07 100644 (file)
@@ -45,7 +45,9 @@ $notification = &Notification::singleton();
 $notification->attach('status');
 
 // Cache.
-$cache = &Horde_Cache::singleton($conf['cache']['driver'], Horde::getDriverConfig('cache', $conf['cache']['driver']));
+if (!empty($conf['caching'])) {
+    $cache = &Horde_Cache::singleton($conf['cache']['driver'], Horde::getDriverConfig('cache', $conf['cache']['driver']));
+}
 
 // Horde base libraries.
 require_once 'Horde/Text.php';