---
title: How can I share my Vercel cache across deployments?
description: Learn how to reuse cached responses across deployments with the Next.js App Router and the Vercel Data Cache.
url: "https://vercel.com/kb/guide/share-vercel-cache-across-deployments-nextjs"
published: 2025-11-03
last_updated: 2026-09-28
authors: Lee Robinson
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

When fetching data from external sources like a database or CMS, it can be beneficial to prevent re-fetching the same data if it has not changed by utilizing caching. This guide will explain how to use the Next.js App Router and the Vercel Data Cache to persist cached data across deployments.

## Requirements

To cache data and share responses across deployments, you must currently use the Next.js App Router (latest version recommended). You cannot share the cache between different projects.

### Next.js App Router

The [Next.js App Router](https://nextjs.org/docs/app) (`app/`) provides more [fine-grained control](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating) over fetching, caching, and revalidating your data. For example, you can fetch and cache data (using [`fetch`](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#fetching-data-on-the-server-with-fetch) or your favorite library) and [revalidate](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#revalidating-data) the data by cache tag or path by defining a [stale time](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#time-based-revalidation) or [programmatically purging](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#on-demand-revalidation) the cache.

### Vercel Data Cache

The [Vercel Data Cache](https://vercel.com/docs/infrastructure/data-cache) is a specialized, granular cache for storing responses from fetches while using modern frontend frameworks like [Next.js](https://vercel.com/docs/frameworks/nextjs). It's a shared cache, meaning users of the same project share the same cache.

Frameworks that integrate with the Data Cache (currently Next.js) can cache data per fetch instead of per route. This means you can have static, dynamic, and revalidated data together in the same route.

## Example

Inside your Next.js application, fetch and tag your data with a cache key:

```typescript
async function Blog() {
  const res = await fetch('https://api.vercel.app/blog', {
    next: { tags: ['blogs'] }
  });
  const blogs = await res.json();
 
  return '...';
}
```

The response from `fetch` will be cached and not re-fetched on the next deployment. Instead, to revalidate the data and purge the cache, you can use `revalidateTag`:

```typescript
'use server'
 
import { revalidateTag } from 'next/cache'
 
export default async function action() {
  revalidateTag('blogs')
}
```

## Frequently asked questions

### What are the differences with build caching?

Caching data from your database, CMS, or other external location is _different_ than [caching artifacts during the build process](https://vercel.com/docs/deployments/troubleshoot-a-build#caching-process).

Vercel's build cache will prevent re-downloading dependencies (`node_modules`), monorepo cache artifacts ([remote cache](https://vercel.com/docs/monorepos/remote-caching)), and framework-specific files.

[Learn more about builds on Vercel](https://vercel.com/docs/deployments/builds).

### What are the differences with Edge Network caching?

Static assets like images, fonts, and JavaScript files can be cached in Vercel's Edge Network regions from the deployment outputs created after a build. These files, typically generated by your framework, usually contain a hash in the filename.

The filename hash enables the ability to safely add `immutable` caching headers since we are guaranteed that a new version of the file will be generated by the framework if something changes. This also means these cached files will persist across deployments.

[Learn more about Edge Network caching](https://vercel.com/docs/edge-network/caching).

### What are the differences with Incremental Static Regeneration?

When a page contains _entirely static data_, Vercel will use [Incremental Static Regeneration](https://vercel.com/docs/incremental-static-regeneration) (ISR) to generate the whole page. However, when a page contains a _mix of static and dynamic data_, the dynamic data needs to be re-fetched when rendering the page. In this scenario, the Vercel Data Cache is used to cache the static data to avoid slow origin fetches.

Both ISR and Vercel Data Cache support time-based revalidation, on-demand revalidation, and tag-based revalidation.

[Learn more about ISR on Vercel](https://vercel.com/docs/incremental-static-regeneration).

## More Next.js guides

- [How do I reduce my build time with Next.js on Vercel?](/kb/guide/how-do-i-reduce-my-build-time-with-next-js-on-vercel): Reduce Next.js build times on Vercel by pre-rendering fewer pages at build time, deferring generation with ISR and image optimization, and using faster build machines.
- [Integrating AWS Secrets Manager with Vercel Using Terraform](/kb/guide/integrating_aws_secrets_manager_with_vercel_using_terraform): Learn how to seamlessly integrate AWS Secrets Manager with Vercel for enhanced security and efficiency in your web deployments using Terraform with our comprehensive guide.
- [Can I redirect from a subdomain to a subpath?](/kb/guide/can-i-redirect-from-a-subdomain-to-a-subpath): Learn how to redirect from your subdomain to a subpath on Vercel with a vercel.json file or with Next.js