summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/user_ldap.php5
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;
}
}