A simple in-memory file cache for Gulp that prevents reprocessing unchanged files.
gulp-cached is a Gulp plugin that provides an in-memory file cache to optimize build processes. It tracks files that have passed through it and only passes downstream those that have changed since the last run, preventing redundant processing. This solves the problem of unnecessary resource consumption in repetitive tasks like linting or compilation.
Developers using Gulp for build automation who want to improve performance by avoiding reprocessing unchanged files in tasks like linting, transpiling, or minification.
It offers a simple, lightweight caching solution that integrates seamlessly with Gulp, reducing build times and resource usage without complex configuration. Unlike some alternatives, it focuses solely on file-level caching with memory optimization options.
A simple in-memory file cache for gulp
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Integrates seamlessly with Gulp tasks using minimal code, as shown in the simple usage example with gulp.src and pipe, requiring no complex setup.
Caches file contents to only pass modified files downstream, preventing redundant processing in tasks like linting and saving computational resources, as demonstrated in the README's example.
Offers an optimizeMemory option to store MD5 hashes instead of full file contents, reducing memory footprint for large files, as detailed in the configuration options.
Allows clearing entire or specific caches via code (e.g., cache.caches = {}), providing fine-grained control over cache invalidation for dynamic workflows.
Does not work with plugins that operate on groups of files, such as gulp-concat, limiting its use in pipelines requiring file aggregation or batch processing.
Cache is stored only in memory and lost when the Gulp process ends, requiring full re-caching on each new session, which can be inefficient for infrequent changes.
Even with the optimizeMemory option, caching many or large files in memory can lead to increased RAM usage, especially in projects with extensive asset libraries.