mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
fix: Use a CappedMemoryCache instead of an array to cache stuff in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
18dddbc3b5
commit
0887810eb9
1 changed files with 3 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ use OCA\User_LDAP\Exceptions\NoMoreResults;
|
|||
use OCA\User_LDAP\Mapping\AbstractMapping;
|
||||
use OCA\User_LDAP\User\Manager;
|
||||
use OCA\User_LDAP\User\OfflineUser;
|
||||
use OCP\Cache\CappedMemoryCache;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\HintException;
|
||||
use OCP\IAppConfig;
|
||||
|
|
@ -49,7 +50,7 @@ class Access extends LDAPUtility {
|
|||
protected $groupMapper;
|
||||
|
||||
private string $lastCookie = '';
|
||||
private array $intermediates = [];
|
||||
private CappedMemoryCache $intermediates;
|
||||
|
||||
public function __construct(
|
||||
ILDAPWrapper $ldap,
|
||||
|
|
@ -63,6 +64,7 @@ class Access extends LDAPUtility {
|
|||
) {
|
||||
parent::__construct($ldap);
|
||||
$this->userManager->setLdapAccess($this);
|
||||
$this->intermediates = new CappedMemoryCache();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue