cache-buildkite-plugin
cache-buildkite-plugin copied to clipboard
Option to update less specific cache when a file cache changes
Currently, if I specify multiple cache levels, e.g.:
path: cache
manifest: foo.txt
save:
- file
- pipeline
The pipeline cache is not updated when the file cache is updated. This results in the pipeline cache becoming quite stale over time. The only way to update it is to either enable force, either temporarily or permanently, or to delete the file. Both of these options aren't ideal.
Ideally there'd be an option to update more general caches when a file cache changes. E.g. when the manifest hash changes, both file and pipeline caches are updated. The hash of the pipeline cache itself doesn't need to change, but the cache should. That way the pipeline cache stays relatively fresh compared to the file cache.
An alternative to this could be an option to allow falling back to the most recently created cache, sort of similar to how github actions' restore-keys works.