Next.js Discord

Discord Forum

Does "use cache" use Data Cache and is the cache invalidated on re-deployment?

Answered
Iridescent shark posted this in #help-forum
Open in Discord
Iridescent sharkOP
I'm wondering if "use cache" uses Data Cache (I assume so and that it's not the same as Edge Network Edge Cache https://vercel.com/docs/edge-network/caching#cache-invalidation) and is the cache invalidated on re-deployment?
Answered by B33fb0n3
ah nvm, I was wrong. It persists across deployments
View full answer

5 Replies

@B33fb0n3 yes, it's the data cache, that is shared with other users on your app. It can be invalidated and should be invalidated on redeployment
Iridescent sharkOP
Thanks! So just to be clear, the entire data cache is automatically purged on re-deployment? I wonder if there’s any way to prevent parts of or the entire cache from being cleared? 🤔
@Iridescent shark Thanks! So just to be clear, the entire data cache is automatically purged on re-deployment? I wonder if there’s any way to prevent parts of or the entire cache from being cleared? 🤔
ah nvm, I was wrong. It persists across deployments
Answer
@B33fb0n3 ah nvm, I was wrong. It persists across deployments
Iridescent sharkOP
Ah cheers
happy to help