markjm / hash-and-cache

Allows you to wrap caching behavior around an arbitrary command. It will take in a list of source files, generate a hash, then check a cache (stored in Azure Storage) to see if those inputs have been seen before. If so it will download the cached outputs instead of running the command. If no cache is found matching the hash it will run the command instead.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hash and Cache

This Azure DevOps extension (and/or NPM package) allows you to wrap caching behavior around a command-line command. Most common scenario is for npm install. This task will hash the contents of your package.lock file, and if it is unchanged from previous runs download a cached copy of the node_modules folder from an Azure Storage account - and skip running npm install.

If package.lock is changed, it will not find a valid cache and will run npm install as normal (and optionally create a new cache entry and upload to Azure Storage).

About

Allows you to wrap caching behavior around an arbitrary command. It will take in a list of source files, generate a hash, then check a cache (stored in Azure Storage) to see if those inputs have been seen before. If so it will download the cached outputs instead of running the command. If no cache is found matching the hash it will run the command instead.

License:MIT License


Languages

Language:JavaScript 100.0%