Skip to content

Caching

How do I cache Go modules?

Quick answer

Cache ~/go/pkg/mod and ~/.cache/go-build keyed on go.sum.

The detail that matters

The build cache matters more than the module cache. Without it every package recompiles even though nothing changed.

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.