diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 0372112f0e2dc4e1abaaaee530300280d5bfdb9e..e5d9b4d5b40eaf99135c3333f4d87b747a165d9c 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -80,7 +80,12 @@ class Connection { public function __construct($configPrefix = '', $configID = 'user_ldap') { $this->configPrefix = $configPrefix; $this->configID = $configID; - $this->cache = \OC_Cache::getGlobalCache(); + $memcache = new \OC\Memcache\Factory(); + if($memcache->isAvailable()) { + $this->cache = $memcache->create(); + } else { + $this->cache = \OC_Cache::getGlobalCache(); + } $this->config['hasPagedResultSupport'] = (function_exists('ldap_control_paged_result') && function_exists('ldap_control_paged_result_response')); }