nuxt-multi-cache (v4.0.3) is a caching module for Nuxt 3 that provides SSR component caching, route caching, data caching, and CDN cache control headers. It supports cache tag-based invalidation and includes an optional API for cache management. Unlike simple page caching, it offers multiple granularity levels (component, route, data) and integrates directly with Nuxt's composables (useRouteCache, useCDNHeaders). The module is actively maintained with frequent releases and requires Nuxt 3 (not compatible with Nuxt 2, which is served by the 1.x branch in maintenance mode). Key differentiators: component-level caching via <RenderCacheable>, tag-based invalidation, and CDN header generation.
npm install nuxt-multi-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures all caching layers (component, route, data, CDN) and uses useRouteCache, useCDNHeaders, and RenderCacheable in a page.
Use Nuxt 3; for Nuxt 2 use nuxt-multi-cache@1.x.
Use a static string or computed constant; for per-request variants, use route caching.
Update to v4 syntax: `useRouteCache((route) => route.setCacheable())`.
Ensure cached components do not rely on async setup or suspense.
Update API client URLs to `/api/cache/...`
Limit number of tags; consider using a single tag that groups many items.
Ensure useRouteCache is called inside setup() or <script setup> and the callback receives the route helper: useRouteCache((route) => route.setCacheable())
Add 'nuxt-multi-cache' to modules in nuxt.config.ts and ensure `multiCache.component.enabled: true`.
Add a unique static cache-key prop, e.g., <RenderCacheable cache-key="navbar">
Enable `multiCache.cdn.enabled: true` in nuxt.config and ensure module is installed.
Check the pattern used in route cache definitions; ensure it matches the current path.