Idea
Add a .Docker cache-key similar to the following:
- save_cache: key: v1-build-cache-{{ .Docker }} paths: "_build
This would cause the cache to be invalidated whenever the docker SHA-256 of an image changes.
The common use case is when you have a docker image that's something like:
docker: - image: circleci/elixir:1.5
Then, when circleci updates the docker image to have a newer version of elixir, or otp, then compiled files have a mismatch. They were built (and cached) for one version of elixir, but are now running on an incompatible
version.
Adding the docker version as a key allows authors to make sure that environment-specific-files are only cached while the dockerfile remains the same.
Thank you!
CCI-I-500