src/Cache.php
protected function cacheResponse(RequestInterface $request, ResponseInterface $response)
    {
        $cacheItem = $this->createCacheItem($this->createKeyFromRequest($request));
        $value = $response->getBody()->__toString();
        $cacheItem->set($value);

        $this
            ->getCacheItemPool()
            ->save($cacheItem);
    }
protected function cacheResponse(RequestInterface $request, ResponseInterface $response)
    {
        $cacheItem = $this->createCacheItem($this->createKeyFromRequest($request));
        $value = $response->getBody()->__toString();
        $cacheItem->set($value);

        $this
            ->getCacheItemPool()
            ->save($cacheItem);
    }
protected function cacheResponse ( RequestInterface $ request , ResponseInterface $ response ) { $ cacheItem = $ this -> createCacheItem ( $ this -> createKeyFromRequest ( $ request ) ) ; $ value = $ response -> getBody ( ) -> __toString ( ) ; $ cacheItem -> set ( $ value ) ; $ this -> getCacheItemPool ( ) -> save ( $ cacheItem ) ; }
Caches a response by Request & Response.

@param RequestInterface  $request  Request as identifier
@param ResponseInterface $response Response to cache

@author Benjamin Carl <opensource@clickalicious.de>
Caches a response by Request & Response .