diff options
author | Robin Appelman <robin@icewind.nl> | 2023-02-09 15:05:34 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-02-10 12:25:23 +0100 |
commit | 853ec60f3eadceebc3955893d6ed4960f5697058 (patch) | |
tree | b5e7a833f81cc00511d57ac017a8b014ad85ac6d /lib/private/User | |
parent | 7341d339eb7a1aa20c6b35e8edb40c1cd7946b96 (diff) | |
download | nextcloud-server-853ec60f3eadceebc3955893d6ed4960f5697058.tar.gz nextcloud-server-853ec60f3eadceebc3955893d6ed4960f5697058.zip |
also cache backend for user in memory instead of always going to redis
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/Manager.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index 937d825ed77..859ebd2a604 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -34,6 +34,7 @@ namespace OC\User; use OC\Hooks\PublicEmitter; +use OC\Memcache\WithLocalCache; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\EventDispatcher\IEventDispatcher; use OCP\HintException; @@ -104,7 +105,7 @@ class Manager extends PublicEmitter implements IUserManager { IEventDispatcher $eventDispatcher) { $this->config = $config; $this->dispatcher = $oldDispatcher; - $this->cache = $cacheFactory->createDistributed('user_backend_map'); + $this->cache = new WithLocalCache($cacheFactory->createDistributed('user_backend_map')); $cachedUsers = &$this->cachedUsers; $this->listen('\OC\User', 'postDelete', function ($user) use (&$cachedUsers) { /** @var \OC\User\User $user */ |