We use a cache key like bundle-dependencies-{{ checksum "Gemfile.lock" }} which works fine, but can't be cleared if needed.
The recommended way to do this is by adding a version to the key, obtained from an environment variable. This way, when we need to invalidate/clear the cache, we simply change the env var. The key is:
We use a cache key like
bundle-dependencies-{{ checksum "Gemfile.lock" }}
which works fine, but can't be cleared if needed.The recommended way to do this is by adding a version to the key, obtained from an environment variable. This way, when we need to invalidate/clear the cache, we simply change the env var. The key is:
And the var value could be
v1
. What do you guys think?