summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-26 11:11:49 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-26 11:11:49 +0200
commit22a41b824715cebb7a6874f1a869d1afde8d9cfc (patch)
treece586a7e8762c34d6951a85bf8fcc541293574b1 /program
parentf773259412bcddd492ac8a93619274eafb3b8d04 (diff)
Make possible to disable shared cache
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 78d7959b7..4471acec0 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -269,16 +269,18 @@ class rcube
{
$shared_name = "shared_$name";
- if (!isset($this->caches[$shared_name])) {
+ if (!array_key_exists($shared_name, $this->caches)) {
$opt = strtolower($name) . '_cache';
$type = $this->config->get($opt);
$ttl = $this->config->get($opt . '_ttl');
if (!$type) {
- $type = $this->config->get('shared_cache');
+ // cache is disabled
+ return $this->caches[$shared_name] = null;
}
+
if ($ttl === null) {
- $ttl = $this->config->get('shared_cache_ttl');
+ $ttl = $this->config->get('shared_cache_ttl', '10d');
}
$this->caches[$shared_name] = new rcube_cache_shared($type, $name, $ttl, $packed);