summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-08-17 17:22:54 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-08-17 17:22:54 +0200
commitf41c4312ff4c99bebf9475c61faaf07edb5b6179 (patch)
treeeccb612f8121e6aa17bf1f3c15f9eb7e4068930e /apps/user_ldap
parentc538ac3081119e8bbd2aa375505ce79047a4d3f4 (diff)
downloadnextcloud-server-f41c4312ff4c99bebf9475c61faaf07edb5b6179.tar.gz
nextcloud-server-f41c4312ff4c99bebf9475c61faaf07edb5b6179.zip
LDAP: use memcache if available
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/connection.php7
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'));
}