cacheFactory->isLocalCacheAvailable()) { try { $podcast = $this->podcastDataReader->tryGetCachedPodcastData($url); } catch (\Exception $e) { } } 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 $e) { } } return new JSONResponse($podcast, $feed->getStatusCode()); } }