cache = $cache; } public function fetch(string $key, Response &$response = null) : bool { $this->item = $this->cache->getItem($key); if ($this->item->isHit()) { $response = $this->item->get(); return true; } return false; } public function store(string $key, Response $response) : bool { $this->item->set($response); return $this->cache->save($this->item); } public function clear() { $this->cache->clear(); } }