From b07426f0c55f2fd2126dd2080e6a89bd334017f9 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 6 Jun 2013 08:58:59 +0200 Subject: Make LDAP cache engine configurable via ldap_cache and ldap_cache_ttl options --- program/lib/Roundcube/rcube_ldap.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'program/lib/Roundcube/rcube_ldap.php') 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(); } -- cgit v1.2.3