A build-time query cache for Next.js to cache data fetching results at build time, reducing runtime API calls and improving performance for statically generated pages. Version 2.0.1 released in March 2021; no active development since then (last commit July 2020). Supports Next.js ^10.0.9. Ships TypeScript types. Alternative to static generation with ISR or SWR, but focused on build-time caching.
npm install next-plugin-query-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to enable the plugin in next.config.js using CommonJS require.
Consider using SWR or React Query for client-side caching, or Incremental Static Regeneration (ISR) for build-time caching.
Check compatibility; may require forking or updating peer dependency.
Use only for static pages; for dynamic data, use client-side caching.
Run npm install next-plugin-query-cache
Use const { withQueryCache } = require('next-plugin-query-cache') in next.config.jsEnsure Next.js version >=10.0.9 and <=11.0.0