vercel cache

The vercel cache command is used to manage the cache for your project, such as CDN cache and Data cache.

terminal
vercel cache purge

Using the vercel cache purge command to purge the CDN cache and Data cache for the current project.

terminal
vercel cache purge --type cdn

Using the vercel cache purge --type cdn command to purge the CDN cache for the currenet project.

terminal
vercel cache purge --type data

Using the vercel cache purge --type data command to purge the Data cache for the current project.

terminal
vercel cache invalidate --tag foo

Using the vercel cache invalidate --tag foo command to invalidate the cached content associated with tag "foo" for the current project. Subsequent requests for this cached content will serve STALE and revalidate in the background.

terminal
vercel cache dangerously-delete --tag foo

Using the vercel cache dangerously-delete --tag foo command to dangerously delete the cached content associated with tag "foo" for the current project. Subsequent requests for this cached content will serve MISS and therefore block while revalidating.

These are options that only apply to the vercel cache command.

The --yes option can be used to bypass the confirmation prompt when purging the cache.

terminal
vercel cache purge --yes

Using the vercel cache purge command with the --yes option.

The following global options can be passed when using the vercel cache command:

For more information on global options and their usage, refer to the options section.


Was this helpful?

supported.