cache->get('richdocuments-demo'); if (!$refresh) { return json_decode($servers, true); } $demoServerList = 'https://col.la/f7clouddemoservers'; $client = $this->clientService->newClient(); try { $response = $client->get($demoServerList); $servers = json_decode($response->getBody(), true)['servers'] ?? []; } catch (\Exception) { $servers = []; } $this->cache->set('richdocuments-demo', json_encode($servers)); return $servers; } }