Go-native cache hook
BoringCache uses GOCACHEPROG rather than archiving Go's cache directory after the fact.
Getting started
Guides
On this page
Docs / Adapter commands / Go
Connect Go's build and test cache to a shared workspace through GOCACHEPROG. Go keeps generating the action and output identities it already uses.
BoringCache uses GOCACHEPROG rather than archiving Go's cache directory after the fact.
The same workspace can serve a developer shell and fresh CI runner.
Go cache can sit beside Docker BuildKit cache when Go builds also happen inside images.
Keep the command and cache tag in .boringcache.toml, then use the same boringcache go entrypoint locally and in CI.
[adapters.go] tag = "go-cache" command = ["go", "test", "./..."] # Run: boringcache go
The Action exports GOCACHEPROG for later Go commands, keeps the cache service available during the job, and closes it cleanly afterward.
- uses: boringcache/one@f0fb9b2d926a32b10c543e92093ba00c5a291b79 # v1.33.0 with: trust-policy: auto mode: go - run: go test ./...
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.
Hugo · GOCACHEPROG build cache.
70–94%
BoringCache stored 70–94% less cache data across public Go, Gradle, Maven, Nx, Turbo, and sccache comparisons.
Open run →47
The public catalog includes Go build cache, sccache, and Rust target cache mounts inside Docker builds.
Open run →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. Learn more