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
{
10 public function __construct(private readonly CacheInterface
$cache) {
13 public function fetch(string $key, Response
&$response = null) : bool {
14 $response = $this->cache
->get($key);
18 public function store(string $key, Response
$response) : bool {
19 return $this->cache
->set($key, $response);
22 public function del(string $key) : void
{
23 $this->cache
->delete($key);
26 public function clear() : void
{
27 $this->cache
->clear();