Skip to content
Bazel remote cache

Bazel remote cache for CI and local builds.

Share action results and output files between CI and developer machines. Matching actions can read the completed result instead of executing again.

.boringcache.toml
workspace = "my-org/app"

[adapters.bazel]
tag = "bazel-cache"
command = ["bazel", "build", "//..."]
boringcache bazel

How BoringCache fits your build.

Action results

Reuse work for actions with matching inputs.

Output files

Make the associated build outputs available to another machine.

Your Bazel graph

Keep the targets, dependencies, and cache keys Bazel already computes.

Share results while Bazel runs the build.

BoringCache supplies the HTTP cache endpoint and workspace access. Bazel retains control of action identity and execution.

Share Bazel results without operating a cache server.

BoringCache manages remote cache storage and workspace access. Keep Bazel's targets and existing runners. A matching action can retrieve its result and outputs; a miss still executes on your machine.

Use the HTTP adapter for Bazel's HTTP cache interface, or the REAPI adapter for its gRPC cache interface. Both provide caching. Neither moves action execution to a remote worker.

Check reuse on a second machine.

Publish from a trusted build, then build the same targets at the same commit from a fresh checkout with restore access. Compare remote cache hits and total build time. A second build on the original runner may reuse local outputs instead.

If actions miss, compare their inputs, toolchain, flags, and environment. Matching source alone does not guarantee matching action keys.

Bazel's remote-cache troubleshooting →

See which Bazel actions reused results.

Inspect action-cache hits, misses, and transferred outputs for each run.

Explore the workspace →
gRPC · Workspace insights
Cache hits

BoringCache · GitHub runner · 4 vCPU

99.5% of 82,319 lookups over 9 builds

Served from the runner
Under 1 ms per read
Read from cache
1.46 GB

Bazel benchmark

All Bazel results →

Build times grouped by runner, with cold and warm builds shown separately.

gRPC

Bazel

Benchmark →

RPC framework. The C++ library and its CSM greeter client and server, built with Bazel.

Average restore, build and save · lower is better

GitHub runner

4 vCPU · 16 GB · Ubuntu 24.04 x86-64

BoringCache
2 min 51 s 9 builds
BuildBuddy
4 min 14 s 9 builds
Depot Cache
7 min 47 s 9 builds
GHA Cache
3 min 4 s 9 builds
Same CPU model

Builds of one commit can land on different CPU models. These ratios use only the build pairs where both caches ran on the same model; above 1.00× means BoringCache's total time over those pairs was lower.

BuildBuddy vs BoringCache
1.33× · 1 of 9
Depot Cache vs BoringCache
1.75× · 1 of 9
GHA Cache vs BoringCache
No same-CPU pair
NativeLink vs BoringCache
3.28× · 3 of 9
6 CPU models recorded
BoringCache · Remote cache
AMD EPYC 7763 (4 builds) · AMD EPYC 9V45 (2 builds) · Intel Xeon Platinum 8573C (1 build) · Intel Xeon 6973P-C (1 build) · AMD EPYC 9V74 (1 build)
BuildBuddy
AMD EPYC 7763 (5 builds) · AMD EPYC 9V45 (2 builds) · Intel Xeon 6973P-C (1 build) · AMD EPYC 9V74 (1 build)
Depot Cache
AMD EPYC 7763 (3 builds) · AMD EPYC 9V45 (3 builds) · AMD EPYC 9V74 (2 builds) · Intel Xeon Platinum 8573C (1 build)
GHA Cache · Bazel --disk_cache restored and saved by actions/cache
AMD EPYC 7763 (2 builds) · Intel Xeon Platinum 8573C (2 builds) · AMD EPYC 9V45 (2 builds) · Intel Xeon 6973P-C (1 build) · Intel Xeon Platinum 8370C (1 build) · AMD EPYC 9V74 (1 build)
NativeLink · NativeLink server on the runner
AMD EPYC 7763 (5 builds) · AMD EPYC 9V74 (2 builds) · AMD EPYC 9V45 (1 build) · Intel Xeon Platinum 8573C (1 build)
Cold and warm builds

Each table is one workflow run with one build per cache. A row marked Different CPU ran on another CPU model than BoringCache at the same level, so part of its time difference can come from the hardware.

One cold and warm build per cache
Cache Cold Warm CPU
BoringCache Remote cache 28 min 3 s 1 min 46 s Cold: Intel Xeon 6973P-C · Warm: AMD EPYC 7763
BuildBuddy 26 min 52 s 1 min 51 s AMD EPYC 9V45 Different CPU
Depot Cache 54 min 20 s 2 min 26 s Cold: AMD EPYC 7763 · Warm: AMD EPYC 9V74 Different CPU
GHA Cache Bazel --disk_cache restored and saved by actions/cache 27 min 2 s 73.7 s Cold: Intel Xeon 6973P-C · Warm: Intel Xeon Platinum 8573C Different CPU
Cache hits

BoringCache · GitHub runner · 4 vCPU

99.5% of 82,319 lookups over 9 builds

Served from the runner
Under 1 ms per read
Read from cache
1.46 GB

Keep shared-cache publication in trusted jobs.

Give consumers restore access and publishers a separate permission. Connect supported CI through OIDC or use scoped credentials.

Connect your CI →

Separate readers and publishers

  • Trusted builds Publish shared cache for the next build Read + publish
  • Pull requests Restore cache without replacing it Read only
  • Local development Use a scoped credential for the workspace Scoped access

Common questions

Does BoringCache change Bazel's cache keys?
No. Bazel still calculates action inputs, outputs, and cache keys. BoringCache provides the shared HTTP cache endpoint.
Can pull requests use Bazel remote cache safely?
Use restore-only access for untrusted jobs and save access only for trusted branches or isolated write scopes.
Is this only for CI?
No. The same workspace can be used locally when the developer has restore access.
Read the Bazel setup guide →

Set up Bazel caching

Install the CLI. Run onboarding to connect your repository and configure your cache.

30-day trial. No credit card required.

curl -sSL https://install.boringcache.com/install.sh | sh
boringcache onboard
boringcache bazel