cache = $cache; } public function get_data(string $key, $default = null) { $data = $this->cache->get($key, $default); if (!is_array($data) || $data === $default) { return $default; } return $data; } public function set_data(string $key, array $value, ?int $ttl = null): bool { return $this->cache->set($key, $value, $ttl); } public function delete_data(string $key): bool { return $this->cache->delete($key); } }