cacheFactory->isLocalCacheAvailable()) { try { $podcast = $this->podcastDataReader->tryGetCachedPodcastData($url); } catch (\Exception) { } } if ($podcast) { return new JSONResponse($podcast); } $client = $this->clientService->newClient(); $feed = $client->get($url); $podcast = PodcastData::parseRssXml((string) $feed->getBody()); if ($this->cacheFactory->isLocalCacheAvailable()) { try { $this->podcastDataReader->trySetCachedPodcastData($url, $podcast); } catch (\Exception) { } } return new JSONResponse($podcast, $feed->getStatusCode()); } }