private function restoreResponse(array $cacheData)
    {
        $body = null;

        if (isset($cacheData['headers']['x-content-digest'][0])) {
            $item = $this->cache->getItem($cacheData['headers']['x-content-digest'][0]);
            if ($item->isHit()) {
                $body = $item->get();
            }
        }

        return new Response(
            $body,
            $cacheData['status'],
            $cacheData['headers']
        );
    }
private function restoreResponse(array $cacheData)
    {
        $body = null;

        if (isset($cacheData['headers']['x-content-digest'][0])) {
            $item = $this->cache->getItem($cacheData['headers']['x-content-digest'][0]);
            if ($item->isHit()) {
                $body = $item->get();
            }
        }

        return new Response(
            $body,
            $cacheData['status'],
            $cacheData['headers']
        );
    }
private function restoreResponse ( array $ cacheData ) { $ body = null ; if ( isset ( $ cacheData [ 'headers' ] [ 'x-content-digest' ] [ 0 ] ) ) { $ item = $ this -> cache -> getItem ( $ cacheData [ 'headers' ] [ 'x-content-digest' ] [ 0 ] ) ; if ( $ item -> isHit ( ) ) { $ body = $ item -> get ( ) ; } } return new Response ( $ body , $ cacheData [ 'status' ] , $ cacheData [ 'headers' ] ) ; }
Restores a Response from the cached data.

@param array $cacheData An array containing the cache data

@return Response|null
Restores a Response from the cached data .