{"id":45550,"library":"next-plugin-query-cache","title":"next-plugin-query-cache","description":"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.","status":"deprecated","version":"2.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/ricokahler/next-plugin-query-cache","tags":["javascript","typescript"],"install":[{"cmd":"npm install next-plugin-query-cache","lang":"bash","label":"npm"},{"cmd":"yarn add next-plugin-query-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add next-plugin-query-cache","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency for Next.js integration","package":"next","optional":false}],"imports":[{"note":"ESM-only; CommonJS require will fail.","wrong":"const withQueryCache = require('next-plugin-query-cache');","symbol":"withQueryCache","correct":"import { withQueryCache } from 'next-plugin-query-cache'"},{"note":"Advanced usage for custom Webpack configuration.","symbol":"QueryCachePlugin","correct":"import { QueryCachePlugin } from 'next-plugin-query-cache'"}],"quickstart":{"code":"// next.config.js\nconst { withQueryCache } = require('next-plugin-query-cache');\nmodule.exports = withQueryCache({\n  // Next.js config\n});","lang":"javascript","description":"Shows how to enable the plugin in next.config.js using CommonJS require."},"warnings":[{"fix":"Consider using SWR or React Query for client-side caching, or Incremental Static Regeneration (ISR) for build-time caching.","message":"Package is deprecated; no updates since July 2020.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Check compatibility; may require forking or updating peer dependency.","message":"Works only with Next.js 10.0.9 and above; incompatible with newer versions.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use only for static pages; for dynamic data, use client-side caching.","message":"Plugin caches queries at build time; dynamic queries will not be cached.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'10.0.9':50 '2.0.1':34 '2020':47 '2021':38 'activ':40 'altern':54 'api':24 'build':8,20,66 'build-tim':7,65 'cach':5,11,15,68 'call':25 'commit':45 'data':16 'develop':41 'fetch':17 'focus':63 'generat':31,57 'improv':27 'isr':59 'javascript':69 'juli':46 'last':44 'march':37 'next':2 'next-plugin-query-cach':1 'next.js':13,49 'page':32 'perform':28 'plugin':3 'queri':4,10 'reduc':22 'releas':35 'result':18 'runtim':23 'ship':51 'sinc':42 'static':30,56 'support':48 'swr':61 'time':9,21,67 'type':53 'typescript':52,70 'version':33","created_at":"2026-06-07T12:55:34.209865+00:00","updated_at":"2026-06-07T12:55:34.209865+00:00","problems":[{"fix":"Run npm install next-plugin-query-cache","cause":"Package not installed or not in node_modules.","error":"Cannot find module 'next-plugin-query-cache'"},{"fix":"Use const { withQueryCache } = require('next-plugin-query-cache') in next.config.js","cause":"Incorrect import method (CommonJS vs ESM).","error":"TypeError: withQueryCache is not a function"},{"fix":"Ensure Next.js version >=10.0.9 and <=11.0.0","cause":"Next.js version mismatch.","error":"Error: 'next' is not a valid peer dependency"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ricokahler/next-plugin-query-cache#readme","github":"https://github.com/ricokahler/next-plugin-query-cache","docs":null,"changelog":null,"pypi":null,"npm":"next-plugin-query-cache","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}