aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-02-09 15:05:34 +0100
committerRobin Appelman <robin@icewind.nl>2023-02-10 12:25:23 +0100
commit853ec60f3eadceebc3955893d6ed4960f5697058 (patch)
treeb5e7a833f81cc00511d57ac017a8b014ad85ac6d /lib/private/User
parent7341d339eb7a1aa20c6b35e8edb40c1cd7946b96 (diff)
downloadnextcloud-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.php3
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 */