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