diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-11-19 18:16:08 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-12-04 19:09:13 +0100 |
commit | 1c369093e5103e34ffac450a096fc36a587f6292 (patch) | |
tree | 73890d40de6cb995b83430a9b798da16fc089dad /apps/user_ldap | |
parent | ee168a121d8ba54e607d739f9e01070ded8bb3b8 (diff) | |
download | nextcloud-server-1c369093e5103e34ffac450a096fc36a587f6292.tar.gz nextcloud-server-1c369093e5103e34ffac450a096fc36a587f6292.zip |
cache total user count
Conflicts:
apps/user_ldap/user_ldap.php
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/user_ldap.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index c2f87ebeb22..38c32cbda4a 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -291,7 +291,12 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface { */ public function countUsers() { $filter = $this->access->getFilterForUserCount(); + $cacheKey = 'countUsers-'.$filter; + if(!is_null($entries = $this->access->connection->getFromCache($cacheKey))) { + return $entries; + } $entries = $this->access->countUsers($filter); + $this->access->connection->writeToCache($cacheKey, $entries); return $entries; } } |