webpack-contrib/cache-loader

feat: add cache invalidation (`options.?`)

kmontag opened this issue · 2 comments

As pointed out in #3, it's important to be able to expire the cache for this loader when the build environment changes. We're currently doing this by naming the cache directory based on a hash of relevant file content (NPM shrinkwrap, webpack config, etc) - however, over time this means developers accumulate a bunch of old cache directories, which need to be cleaned up manually or in a separate build step.

Would it be possible to add a cache-key option that, when changed, would cause the loader to just ignore and overwrite existing cache files?

@kmontag It is reduce performance, eslint, stylelint, babel-loader and etc don't removes old cache files, it is normal behavior

sokra commented

done