There is one cache per branch and language version / compiler version / JDK version / Gemfile location, etc.
This is too vague as it doesn’t give any way to determine if two jobs will be using the same or a different cache.
hxxps://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script/shared/directory_cache/base.rb#L236-L253 and hxxps://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script.rb#L147-L157 suggest that:
In the cache path, which looks like
the long hash is the hash of all environment variables specified in the
.yml (they can be seen at the start of a build log) except the secret ones.
- The only way to reuse another job’s cache is to use the same exact system image and environment variables
Is all this right?
Does this mean that I cannot make a “shared” cache for multiple jobs? In particular, I’m looking into making a source distribution, then building it on all supported platforms.