public function has(string $key): bool
    {
        if (array_key_exists($key, $this->ttl) &&
            $this->time() - $this->ttl[$key] > 0
        ) {
            unset($this->ttl[$key]);
            unset($this->storage[$key]);

            return false;
        }

        return array_key_exists($key, $this->storage);
    }