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.
npm install netlify-plugin-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minimal netlify.toml configuration to cache two directories between builds.
Ensure your build script exits with code 0 for caching to work.
Monitor cache size and consider caching only essential directories.
Consider switching to @netlify/plugin-cache or framework-specific caching.
Run 'npm install --save-dev netlify-plugin-cache' or add to package.json dependencies.
Change to 'paths = ["myfolder"]' in netlify.toml.
No dependency data recorded yet.