#Purge Cache in Vercel

1 messages · Page 1 of 1 (latest)

lost cypress
#

Hi folks! I'm using Vercel PRO, and I've deploymed my app in it.

Problem: Each time I make a new deployment on my domain, it will serve the old pages (that exists on cache).

Qq: How can I Clear Cache of all the users that use my domain?

limpid joltBOT
#

Hi @lost cypress. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hi! When you deploy with a custom domain, the cache for that domain is automatically purged. This means that users will never see content from a previous deployment on your custom domain, and there is no need to invalidate it manually when deploying source (https://vercel.com/docs/concepts/functions/edge-caching).

However, if you need to purge your Data Cache and force revalidation, you can follow these steps:

  1. Under your project, go to the Settings tab.
  2. In the Data Cache section, select Purge Everything.
  3. On the dialog, confirm that you wish to delete and click the Continue & Purge Everything button.

Purging your data cache will create a temporary increase in request times for users as new data needs to be refetched source (https://vercel.com/docs/infrastructure/data-cache/manage-data-cache#purging-data-cache).

If you want to disable fetch caching in your Next.js application, you can use the following code:

export const fetchCache = 'force-no-store';

Or, you can opt out individual fetches by using the cache option:

const res = await fetch('https://example.com', { cache: 'no-store' });

source (https://vercel.com/docs/infrastructure/data-cache/manage-data-cache#disabling-vercel-data-cache)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

Vercel Documentation

Vercel Serverless Functions enable running code on-demand without needing to manage your own infrastructure, provision servers, or upgrade hardware.

Vercel Documentation

Learn how to enable, disable, and manage your usage for Vercel Data Cache