Guides
How to share a build cache across repositories
Each repository maintains its own cache for the same shared dependencies.
5 min read
Each repository maintains its own cache for the same shared dependencies.
Why it happens
GitHub scopes caches to a repository, so identical work is done and stored many times over.
How to fix it
- Use a remote build cache (Gradle, Bazel, Turborepo, Nx) shared across repositories
- Use a provider whose cache is organisation-scoped rather than repository-scoped
- Publish shared dependencies as versioned artifacts instead of rebuilding them
Your next build could be twice as fast, at half the price
Start free. Migrating away is the same one line, and we publish that diff too.
Related
How to make CI caches actually persistCaches are configured but hit rate is low.How to work around the 10 GB cache limitYour caches exceed 10 GB per repository and start silently evicting.How to share a Docker cache between jobsEach matrix leg rebuilds the same layers.How to fix Docker cache invalidationDocker layers rebuild even when the relevant files did not change.