cache total user count
Conflicts: apps/user_ldap/user_ldap.php
This commit is contained in:
parent
ee168a121d
commit
1c369093e5
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue