src/Provider/Cache.php
protected function transformUrl($url, $transformation)
    {
        $cachedUrl = $this->pool->getItem(md5($url));

        if ($cachedUrl->isMiss()) {
            $url = $this->provider->$transformation($url);

            $cachedUrl->set($url);
        } else {
            $url = $cachedUrl->get();
        }

        return $url;
    }
protected function transformUrl($url, $transformation)
    {
        $cachedUrl = $this->pool->getItem(md5($url));

        if ($cachedUrl->isMiss()) {
            $url = $this->provider->$transformation($url);

            $cachedUrl->set($url);
        } else {
            $url = $cachedUrl->get();
        }

        return $url;
    }
protected function transformUrl ( $ url , $ transformation ) { $ cachedUrl = $ this -> pool -> getItem ( md5 ( $ url ) ) ; if ( $ cachedUrl -> isMiss ( ) ) { $ url = $ this -> provider -> $ transformation ( $ url ) ; $ cachedUrl -> set ( $ url ) ; } else { $ url = $ cachedUrl -> get ( ) ; } return $ url ; }
Shorten or expand a URL checking it in the cache first

@param string $url
@param string $transformation

@return string
Shorten or expand a URL checking it in the cache first