public function setPath(string $path) : void
    {
        if (!is_writable($path)) {
            throw new Exception("The path to the cache is not writable.");
        }

        $this->cachePath = $path;
    }