Details
-
Suggestion
-
Resolution: Won't Fix
Description
I would be nice that cache pipelines had a way to determine an integrity field.
With this field pipeline could determine if a `cache` is different or not to the previously stored in this way:
1. When the pipeline starts it lookup for the defined `cache` and if it exists, pipeline extracts it and uses.
2. On Pipeline teardown, Pipeline computes the integrity for the cache according to the files in the container.
3. If the integrity value is equal to the value of the integrity of the cache extracted in step 1, it doesn't update the cache; but,
4. If the integrity value is different, the cache is compressed, stored, and updated; and also the integrity value for this cache is updated.
For example, for node cache, pipeline could compute hash of `yarn.lock` or `package-lock.json` file on Pipeline Teardown and if this hash is different to previous integrity value, pipeline could replace that cache.
What do you think about this?