Skip to content
Snippets Groups Projects
Commit 1c71d5c4 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: cache display names immediately on retrieval, saves tens of unecessary...

LDAP: cache display names immediately on retrieval, saves tens of unecessary queries to LDAP server in the share dialog for example
parent a4ab29da
No related branches found
No related tags found
No related merge requests found
......@@ -434,12 +434,18 @@ class Access extends LDAPUtility {
$ocname = $this->dn2ocname($ldapObject['dn'], $nameByLDAP, $isUsers);
if($ocname) {
$ownCloudNames[] = $ocname;
$this->cacheDisplayName($ocname, $nameByLDAP);
}
continue;
}
return $ownCloudNames;
}
public function cacheDisplayName($uid, $displayName) {
$cacheKeyTrunk = 'getDisplayName';
$this->connection->writeToCache($cacheKeyTrunk.$uid,$displayName);
}
/**
* @brief creates a unique name for internal ownCloud use for users. Don't call it directly.
* @param $name the display name of the object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment