public function setCachePath(string $path)
    {
        $rpath = substr($path, 0, 6) === "vfs://" ? $path : realpath($path);
        if (empty($rpath) || !file_exists($path))
            throw new InvalidArgumentException("Path does not exist: " . $rpath);
        $this->cache_path = $rpath;
    }