summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-02-11 15:24:49 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2015-02-11 15:24:49 +0100
commitc3e441044d07cb89c12fb52b6adc02c4ca4ad2cc (patch)
tree448c24079fee58454797179fee55a978ef3c2a94 /program/lib/Roundcube
parent09d52dbb6716373ded6c116547cc5fcdc84f5487 (diff)
Allow the timeout and retry interval for memcached servers to be configured
Diffstat (limited to 'program/lib/Roundcube')
-rw-r--r--program/lib/Roundcube/rcube.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index 819c7f848..3aca88843 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -215,7 +215,10 @@ class rcube
$this->mc_available = 0;
// add all configured hosts to pool
- $pconnect = $this->config->get('memcache_pconnect', true);
+ $pconnect = $this->config->get('memcache_pconnect', true);
+ $timeout = $this->config->get('memcache_timeout', 1);
+ $retry_interval = $this->config->get('memcache_retry_interval', 15);
+
foreach ($this->config->get('memcache_hosts', array()) as $host) {
if (substr($host, 0, 7) != 'unix://') {
list($host, $port) = explode(':', $host);
@@ -226,7 +229,7 @@ class rcube
}
$this->mc_available += intval($this->memcache->addServer(
- $host, $port, $pconnect, 1, 1, 15, false, array($this, 'memcache_failure')));
+ $host, $port, $pconnect, 1, $timeout, $retry_interval, false, array($this, 'memcache_failure')));
}
// test connection and failover (will result in $this->mc_available == 0 on complete failure)