3 namespace seekat\API\Call\Cache\Service
;
5 use http\Client\Response
;
6 use Psr\SimpleCache\CacheInterface
;
7 use seekat\API\Call\Cache\Service
;
9 final class Simple
implements Service
16 public function __construct(CacheInterface
$cache) {
17 $this->cache
= $cache;
20 public function fetch(string $key, Response
&$response = null) : bool {
21 $response = $this->cache
->get($key);
25 public function store(string $key, Response
$response) : bool {
26 return $this->cache
->set($key, $response);
29 public function clear() {
30 $this->cache
->clear();