protected function restore($uuid, $scope = null)
    {
        // Get cache instance - at this point all PSR-6 compatibles are allowed
        $cache = $this->getRegistry()->getCache();

        // Check if we use scopes
        if ($cache instanceof Doozr_Cache_Service) {
            /* @var Doozr_Cache_Service $cache */
            $routes = $cache->read(
                $uuid,
                $scope
            );

        } else {
            /* @var CacheItemPoolInterface $cache */
            $routes = $cache->getItem($uuid);

            // Get value out of item
            $routes = $routes->get();
        }

        return $routes;
    }
protected function restore($uuid, $scope = null)
    {
        // Get cache instance - at this point all PSR-6 compatibles are allowed
        $cache = $this->getRegistry()->getCache();

        // Check if we use scopes
        if ($cache instanceof Doozr_Cache_Service) {
            /* @var Doozr_Cache_Service $cache */
            $routes = $cache->read(
                $uuid,
                $scope
            );

        } else {
            /* @var CacheItemPoolInterface $cache */
            $routes = $cache->getItem($uuid);

            // Get value out of item
            $routes = $routes->get();
        }

        return $routes;
    }
protected function restore ( $ uuid , $ scope = null ) { // Get cache instance - at this point all PSR-6 compatibles are allowed $ cache = $ this -> getRegistry ( ) -> getCache ( ) ; // Check if we use scopes if ( $ cache instanceof Doozr_Cache_Service ) { /* @var Doozr_Cache_Service $cache */ $ routes = $ cache -> read ( $ uuid , $ scope ) ; } else { /* @var CacheItemPoolInterface $cache */ $ routes = $ cache -> getItem ( $ uuid ) ; // Get value out of item $ routes = $ routes -> get ( ) ; } return $ routes ; }
Restores stored routes from cache.

@param string $uuid  Uuid to restore
@param null   $scope Scope to restore from

@author Benjamin Carl <opensource@clickalicious.de>

@return mixed|null|\Psr\Cache\CacheItemInterface
Restores stored routes from cache .