{"id":45542,"library":"netlify-plugin-cache","title":"Netlify Plugin: Custom Cache","description":"A generic Netlify build plugin that caches and restores arbitrary files and directories between builds using Netlify's native cache-utils. Version 1.0.3 is the latest stable release, with no active development. It acts as a thin wrapper around the official cache utility, supporting any static site generator by caching specified paths (defaulting to ['.cache']). Unlike framework-specific cache plugins, this one is intentionally framework-agnostic, allowing users to define custom cache paths for tools like Hugo, Gatsby, Jekyll, Next.js, or any other build tool. The plugin saves cached files after a successful build and restores them before the next build, significantly reducing build times and saving build minutes. No notable release cadence; last updated in 2021.","status":"maintenance","version":"1.0.3","language":"javascript","source_language":"en","source_url":"https://github.com/jakejarvis/netlify-plugin-cache","tags":["javascript","netlify","netlify-plugin","cache","ci","build","plugin"],"install":[{"cmd":"npm install netlify-plugin-cache","lang":"bash","label":"npm"},{"cmd":"yarn add netlify-plugin-cache","lang":"bash","label":"yarn"},{"cmd":"pnpm add netlify-plugin-cache","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a Netlify build plugin, not a Node.js module. It is configured in netlify.toml, not imported in code.","wrong":"npm install netlify-plugin-cache","symbol":"netlify-plugin-cache","correct":"// Add to netlify.toml:\n[[plugins]]\npackage = \"netlify-plugin-cache\""},{"note":"paths must be an array, even for a single path. If omitted, defaults to [\".cache\"].","wrong":"[[plugins]]\npackage = \"netlify-plugin-cache\"\n  [plugins.inputs]\n  paths = \"resources\"","symbol":"paths input","correct":"[[plugins]]\npackage = \"netlify-plugin-cache\"\n  [plugins.inputs]\n  paths = [\"resources\", \"_vendor\"]"}],"quickstart":{"code":"# netlify.toml\n[[plugins]]\npackage = \"netlify-plugin-cache\"\n  [plugins.inputs]\n  # Cache Hugo resources and Gatsby .cache\n  paths = [\"resources\", \".cache\"]","lang":"typescript","description":"Minimal netlify.toml configuration to cache two directories between builds."},"warnings":[{"fix":"Ensure your build script exits with code 0 for caching to work.","message":"The plugin only caches after a successful build. If the build fails, the cache is not updated, and the previous cache is restored on the next run.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Monitor cache size and consider caching only essential directories.","message":"Plugin is a wrapper around @netlify/cache-utils, which has its own limitations. Large caches may exceed Netlify's storage limits (default 1GB per site).","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider switching to @netlify/plugin-cache or framework-specific caching.","message":"The package has not been updated since 2021. Netlify now offers official cache plugins (e.g., @netlify/plugin-cache) that may be better maintained.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.0.3':28 '2021':124 'act':39 'activ':36 'agnost':73 'allow':74 'arbitrari':14 'around':44 'build':8,19,91,101,108,111,115,132 'cach':4,11,25,47,55,60,65,79,96,130 'cache-util':24 'cadenc':120 'ci':131 'custom':3,78 'default':58 'defin':77 'develop':37 'directori':17 'file':15,97 'framework':63,72 'framework-agnost':71 'framework-specif':62 'gatsbi':85 'generat':53 'generic':6 'hugo':84 'intent':70 'javascript':125 'jekyl':86 'last':121 'latest':31 'like':83 'minut':116 'nativ':23 'netlifi':1,7,21,126,128 'netlify-plugin':127 'next':107 'next.js':87 'notabl':118 'offici':46 'one':68 'path':57,80 'plugin':2,9,66,94,129,133 'reduc':110 'releas':33,119 'restor':13,103 'save':95,114 'signific':109 'site':52 'specif':64 'specifi':56 'stabl':32 'static':51 'success':100 'support':49 'thin':42 'time':112 'tool':82,92 'unlik':61 'updat':122 'use':20 'user':75 'util':26,48 'version':27 'wrapper':43","created_at":"2026-06-07T12:55:31.842576+00:00","updated_at":"2026-06-07T12:55:31.842576+00:00","problems":[{"fix":"Run 'npm install --save-dev netlify-plugin-cache' or add to package.json dependencies.","cause":"Package name misspelled or not installed via npm/yarn as a dev dependency.","error":"Error: In netlify.toml: Plugin netlify-plugin-cache not found"},{"fix":"Change to 'paths = [\"myfolder\"]' in netlify.toml.","cause":"The paths input is provided as a string instead of an array.","error":"Plugin netlify-plugin-cache: input 'paths' must be an array"}],"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/jakejarvis/netlify-plugin-cache#readme","github":"https://github.com/jakejarvis/netlify-plugin-cache","docs":null,"changelog":null,"pypi":null,"npm":"netlify-plugin-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}}