private function cacheOrFetchResult($url)
    {
        if ($this->cache !== false) {
            /** @var AbstractCache $cache */
            $cache = $this->cache;
            $cache->setSeconds($this->seconds);
            if ($cache->isCached($url)) {
                $this->wasCached = true;
                return $cache->getCached($url);
            }
            $result = $this->fetcher->fetch($url);
            $cache->setCached($url, $result);
        } else {
            $result = $this->fetcher->fetch($url);
        }
        $this->wasCached = false;

        return $result;
    }
private function cacheOrFetchResult($url)
    {
        if ($this->cache !== false) {
            /** @var AbstractCache $cache */
            $cache = $this->cache;
            $cache->setSeconds($this->seconds);
            if ($cache->isCached($url)) {
                $this->wasCached = true;
                return $cache->getCached($url);
            }
            $result = $this->fetcher->fetch($url);
            $cache->setCached($url, $result);
        } else {
            $result = $this->fetcher->fetch($url);
        }
        $this->wasCached = false;

        return $result;
    }
private function cacheOrFetchResult ( $ url ) { if ( $ this -> cache !== false ) { /** @var AbstractCache $cache */ $ cache = $ this -> cache ; $ cache -> setSeconds ( $ this -> seconds ) ; if ( $ cache -> isCached ( $ url ) ) { $ this -> wasCached = true ; return $ cache -> getCached ( $ url ) ; } $ result = $ this -> fetcher -> fetch ( $ url ) ; $ cache -> setCached ( $ url , $ result ) ; } else { $ result = $ this -> fetcher -> fetch ( $ url ) ; } $ this -> wasCached = false ; return $ result ; }
Fetches the result or delivers a cached version of the result.

@param string $url

@return string
Fetches the result or delivers a cached version of the result .