for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kevinrob\GuzzleCache\Storage;
use Kevinrob\GuzzleCache\CacheEntry;
use Psr\SimpleCache\CacheInterface;
class Psr16CacheStorage implements CacheStorageInterface
{
/**
* @var CacheInterface
*/
private $cache;
public function __construct(CacheInterface $cache)
$this->cache = $cache;
}
* {@inheritdoc}
public function fetch($key)
$data = $this->cache->get($key);
if ($data instanceof CacheEntry) {
return $data;
return null;
public function save($key, CacheEntry $data)
$this->cache->set($key, $data);
public function delete($key)
return $this->cache->delete($key);