Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 030d2d3e authored by theronakpatel's avatar theronakpatel
Browse files

added array for clientsCache

parent 5af6ec62
Loading
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -160,11 +160,8 @@ class SSOService {
		// Try to get cached clients
		$cachedClients = $this->clientsCache->get($cacheKey);
		if ($cachedClients !== null) {
			$clients = json_decode($cachedClients, true);
			if (is_array($clients)) {
			$this->logger->debug('Returning cached clients from distributed cache');
				return $clients;
			}
			return $cachedClients;
		}
		
		try {
@@ -175,9 +172,7 @@ class SSOService {
				return [];
			}

			// Cache the clients for 24 hours (converted to JSON string)
			$clientsJson = json_encode($clients);
			$this->clientsCache->set($cacheKey, $clientsJson, self::CLIENTS_CACHE_TTL);
			$this->clientsCache->set($cacheKey, $clients, self::CLIENTS_CACHE_TTL);
			
			return $clients;
		} catch (\Exception $e) {