diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-08-18 02:50:41 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-08-18 02:50:41 -0700 |
commit | dda5eb253006e9f984047595dca2c9d03d53fe80 (patch) | |
tree | 755e56bfbb4dc551ab4859558191dda902eb3d93 /apps/user_ldap/lib | |
parent | c427e256e1509453503140c0adacd3abcb7ef368 (diff) | |
parent | f41c4312ff4c99bebf9475c61faaf07edb5b6179 (diff) | |
download | nextcloud-server-dda5eb253006e9f984047595dca2c9d03d53fe80.tar.gz nextcloud-server-dda5eb253006e9f984047595dca2c9d03d53fe80.zip |
Merge pull request #4486 from owncloud/ldap_adjust_cache
LDAP: use memcache if available
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/connection.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index 0372112f0e2..e5d9b4d5b40 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')); } |