Skip to content

Share multiple caches between jobs in gitlab-ci.yml

Description

It would be nice to have some way to combine multiple caches together in a job. For example, I have a project which would like Rust toolchains cached as well as a build of Git master. In order to not pull down/require the Git build on those just using the stock one, I'd like to just give them the toolchains, but the Git master build should also have access to the toolchain.

Proposal

Add a cache:keys key for jobs which would pull from the named caches, but wouldn't be used to refresh them.

Links / references