Skip to content
Configurationnext.config.jsturbopackPersistentCaching

turbopackPersistentCaching

This feature is currently available in the canary channel and subject to change. Try it out by upgrading Next.js, and share your feedback on GitHub.

Usage

Turbopack Persistent Caching enables Turbopack to reduce work across next dev or next build commands. When enabled, Turbopack will save and restore data to the .next folder between builds, which can greatly speed up subsequent builds and dev sessions.

Warning: Persistent Caching is still under development and is not yet stable. Users adopting should expect some stability issues.

Good to know: Note that while next dev and next build can share cached data with each other, most cache entries are command-specific due to different configuration and environment variables.

next.config.ts
import type { NextConfig } from 'next'
 
const nextConfig: NextConfig = {
  experimental: {
    turbopackPersistentCaching: true,
  },
}
 
export default nextConfig

Version Changes

VersionChanges
v15.5.0Persistent caching released as experimental