Skip to content

Guides

Choosing a buildx cache backend

There are four cache backends and it is unclear which to use.

6 min read

There are four cache backends and it is unclear which to use.

Why it happens

Each trades transfer cost against portability, and the right answer depends on how often your image changes.

How to fix it

  1. inline: simplest, but only caches the final stage — avoid for multi-stage builds
  2. registry: portable across machines, but pays transfer cost on every build
  3. gha: convenient, but competes with your other caches for the same 10 GB
  4. local on a persistent builder: no transfer at all, and the fastest option available

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.