LDAP: use memcache if available
This commit is contained in:
parent
c538ac3081
commit
f41c4312ff
1 changed files with 6 additions and 1 deletions
|
@ -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'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue