A temp file based caching proxy task for Gulp. Currently at version 1.1.3 (stable), with a maintenance status as the package is not actively developed. It caches the output of any Gulp plugin based on file contents or custom keys, reducing repeated processing. Unlike other caching approaches, it stores full plugin output in a swap file cache, and supports custom success/value extractors for result inspection. Requires Node >=8 and Gulp 4+.
npm install gulp-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of gulp-cache to cache the output of gulp-jshint, with custom success and value functions.
Upgrade to Node >=8 and Gulp >=4. Use .pipe(cache(plugin, options)) syntax.
Replace fileCache with the 'cache' option.
If you need hashing, hash the key yourself before returning.
Use cache.clear() in a clean task or schedule periodic cleanup.
Update success/file to return boolean, and value to return the object directly.
Set a custom cache directory with write permissions via options.cacheDir or environment variable.
Check that gulp.src() actually yields files. Ensure your key function handles falsy file gracefully.
Run 'npm install --save-dev gulp-cache' or 'yarn add --dev gulp-cache'.
Use 'const cache = require('gulp-cache');' (without destructuring). Or use ESM import syntax.