summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-06-06 08:58:59 +0200
committerAleksander Machniak <alec@alec.pl>2013-06-06 08:58:59 +0200
commitb07426f0c55f2fd2126dd2080e6a89bd334017f9 (patch)
treed81c9f5e6b9771ffbea762e07b78a03cb170b0c5 /program
parentf65890773147ee513647b0e0062e05748bd788c9 (diff)
Make LDAP cache engine configurable via ldap_cache and ldap_cache_ttl options
Diffstat (limited to 'program')
-rw-r--r--program/lib/Roundcube/rcube_ldap.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index 70163b21c..39a48b456 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -185,8 +185,12 @@ class rcube_ldap extends rcube_addressbook
$this->mail_domain = $mail_domain;
// initialize cache
- $rcube = rcube::get_instance();
- $this->cache = $rcube->get_cache('LDAP.' . asciiwords($this->prop['name']), 'db', 600);
+ $rcube = rcube::get_instance();
+ $cache_type = $rcube->config->get('ldap_cache', 'db');
+ $cache_ttl = $rcube->config->get('ldap_cache_ttl', '10m');
+ $cache_name = 'LDAP.' . asciiwords($this->prop['name']);
+
+ $this->cache = $rcube->get_cache($cache_name, $cache_type, $cache_ttl);
$this->_connect();
}