Gradle-native cache
The build still uses Gradle's cacheable task model and HTTP build-cache protocol.
Getting started
On this page
j / k move between sections.
Docs / Adapter commands / Gradle
Keep Gradle's task cacheability and cache keys. The adapter supplies the shared HTTP build-cache endpoint and write policy.
The build still uses Gradle's cacheable task model and HTTP build-cache protocol.
A JVM repo can share Gradle cache, Docker cache, and dependency archives under one repo cache plan.
Run pull requests restore-only, then publish cache from trusted branches.
Keep the command and cache tag in .boringcache.toml, then use the same boringcache gradle entrypoint locally and in CI.
[adapters.gradle] tag = "gradle-cache" command = ["./gradlew", "build", "--no-daemon"] # Run: boringcache gradle
The Action prepares Gradle's HTTP build-cache configuration for the later wrapper command and keeps your existing project settings in place.
- uses: boringcache/one@1781572d7b3ec5aef652f8ba479b981439b2776b # v1.48.2 with: trust-policy: auto mode: gradle - run: ./gradlew build --no-daemon
Approve the repository through Connect CI and grant the job contents: read and id-token: write. The Action uses that Machine connection. Pull requests restore by default; trusted jobs may publish. See the authentication example in the GitHub Actions reference for scoped credentials when OIDC is unavailable.
OpenTelemetry Java builds the same upstream commits with BoringCache, Bitrise Build Cache, Depot Cache and GHA Cache on the same runner classes.
Gradle
Benchmark →OpenTelemetry API and SDK for Java.
Average restore, build and save · lower is better
4 vCPU · 16 GB · Ubuntu 24.04 x86-64
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.
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.
| Cache | Cold | Warm | CPU |
|---|---|---|---|
| BoringCache Build cache | 12 min 22 s | 2 min 8 s | AMD EPYC 9V74 |
| Depot Cache | 16 min 0 s | 2 min 36 s | Cold: AMD EPYC 7763 · Warm: AMD EPYC 9V74 Different CPU |
| GHA Cache Local cache directory restored and saved by actions/cache | 13 min 18 s | 95.5 s | AMD EPYC 9V45 Different CPU |
BoringCache · GitHub runner · 4 vCPU
96.7% of 4,722 lookups over 6 builds
Check the tool's own reference when you need cache-key rules, build settings, or version-specific behavior.
Compare every supported command, protocol, and Action mode in one place.
Adapter command index →Need help or found something unclear? Open an issue or browse the CLI repo.
We use cookies to understand how people use BoringCache. Privacy policy