New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cache-loader-hash

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cache-loader-hash

Caches the result of following loaders on disk.

  • 4.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by150%
Maintainers
1
Weekly downloads
 
Created
Source

cache-loader-hash

Added the mode option to the cache-loader options, supporting mtime (default) and hash.

Usage

webpackChain.module
  .rule('js') // or ts, tsx, vue...
  .use('cache-loader')
  .loader(require.resolve('cache-loader-hash'))
  .tap((options) => {
    options.mode = 'hash';
    return options;
  });

No Breaking Change

No breaking change when using mtime mode.

Why

We are doing a CI package acceleration work, which will store node_modules/.cache on s3, and then pull it from s3 at a certain time. due to The cache-loader uses mtime by default for cache verification, which causes the newly installed node_modules in the new CI process to not match the mtime of node_modules/.cache on s3. The solution to this problem is to use the hash of the file instead of mtime as the cache verification method of the cache-loader.

License

MIT

Keywords

FAQs

Package last updated on 08 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc