Loading lib/Service/SSOService.php +6 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCA\EcloudAccounts\Exception\SSOAdminAccessTokenException; use OCA\EcloudAccounts\Exception\SSOAdminAPIException; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; use OCP\ILogger; use OCP\IUserManager; Loading @@ -28,8 +29,7 @@ class SSOService { private IFactory $l10nFactory; private IUserManager $userManager; private TwoFactorMapper $twoFactorMapper; private ICache $clientsCache; private ICacheFactory $cacheFactory; private string $mainDomain; private string $legacyDomain; Loading Loading @@ -60,8 +60,7 @@ class SSOService { $this->l10nFactory = $l10nFactory; $this->userManager = $userManager; $this->twoFactorMapper = $twoFactorMapper; $this->clientsCache = $cacheFactory->createDistributed('ecloud_accounts_realm_clients'); $this->cacheFactory = $cacheFactory; $this->mainDomain = $this->config->getSystemValue("main_domain"); $this->legacyDomain = $this->config->getSystemValue("legacy_domain"); Loading Loading @@ -157,7 +156,8 @@ class SSOService { $cacheKey = "{$clientsUrl}|no_params|no_keys"; // Try to get cached clients $cachedClients = $this->clientsCache->get($cacheKey); $clientsCache = $this->cacheFactory->createDistributed('ecloud_accounts_realm_clients'); $cachedClients = $clientsCache->get($cacheKey); if ($cachedClients !== null) { $this->logger->debug('Returning cached clients from distributed cache'); return $cachedClients; Loading @@ -171,7 +171,7 @@ class SSOService { return []; } $this->clientsCache->set($cacheKey, $clients, self::CLIENTS_CACHE_TTL); $clientsCache->set($cacheKey, $clients, self::CLIENTS_CACHE_TTL); return $clients; } catch (\Exception $e) { Loading Loading
lib/Service/SSOService.php +6 −6 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use OCA\EcloudAccounts\Db\TwoFactorMapper; use OCA\EcloudAccounts\Exception\SSOAdminAccessTokenException; use OCA\EcloudAccounts\Exception\SSOAdminAPIException; use OCP\ICache; use OCP\ICacheFactory; use OCP\IConfig; use OCP\ILogger; use OCP\IUserManager; Loading @@ -28,8 +29,7 @@ class SSOService { private IFactory $l10nFactory; private IUserManager $userManager; private TwoFactorMapper $twoFactorMapper; private ICache $clientsCache; private ICacheFactory $cacheFactory; private string $mainDomain; private string $legacyDomain; Loading Loading @@ -60,8 +60,7 @@ class SSOService { $this->l10nFactory = $l10nFactory; $this->userManager = $userManager; $this->twoFactorMapper = $twoFactorMapper; $this->clientsCache = $cacheFactory->createDistributed('ecloud_accounts_realm_clients'); $this->cacheFactory = $cacheFactory; $this->mainDomain = $this->config->getSystemValue("main_domain"); $this->legacyDomain = $this->config->getSystemValue("legacy_domain"); Loading Loading @@ -157,7 +156,8 @@ class SSOService { $cacheKey = "{$clientsUrl}|no_params|no_keys"; // Try to get cached clients $cachedClients = $this->clientsCache->get($cacheKey); $clientsCache = $this->cacheFactory->createDistributed('ecloud_accounts_realm_clients'); $cachedClients = $clientsCache->get($cacheKey); if ($cachedClients !== null) { $this->logger->debug('Returning cached clients from distributed cache'); return $cachedClients; Loading @@ -171,7 +171,7 @@ class SSOService { return []; } $this->clientsCache->set($cacheKey, $clients, self::CLIENTS_CACHE_TTL); $clientsCache->set($cacheKey, $clients, self::CLIENTS_CACHE_TTL); return $clients; } catch (\Exception $e) { Loading