Remote cache
Choose a backend and share compiler outputs between machines
A remote lets one machine reuse compatible outputs another has published. Kache checks the local store first. After a local miss, the daemon can download an exact matching entry; it uploads new entries in the background.
You do not need a remote for local builds or reuse between worktrees on one machine.
Choose a backend
| You already have… | Use | Setup |
|---|---|---|
| An S3-compatible bucket, including AWS S3, R2, or MinIO | s3 | S3 setup |
| A Google Cloud Storage bucket | gcs | GCS setup |
| A directory mounted on each machine | filesystem | Filesystem setup |
| An OCI registry such as GHCR | oci | OCI setup |
Follow the selected guide to configure [cache.remote] and credentials, then run:
kache doctor
cargo build --locked
kache daemon stop
doctor shows the remote and checks that it answers a read. It never tries a
write, and on S3 a read that the bucket policy refuses counts as a miss, so a
passing check does not prove that a job can publish.
The build uses the daemon for remote lookups and background uploads.
daemon stop gives queued uploads up to 30 seconds before the daemon exits,
which matters on an ephemeral runner.
CI setup covers what happens to the
rest.
Control who publishes
Use CI setup for write policy and credential examples. On GitHub Actions and GitLab CI, remote writes normally require a push to a protected branch. An optional pull-request prefix permits isolated writes on supported backends. OCI pull requests remain read-only because registry tag prefixes cannot isolate write permissions.
A remote contains compiler outputs. Only give write access to jobs and people you trust to produce those outputs.
Manage an existing remote
- Sync explains explicit pulls and pushes without the daemon.
- Bounding storage covers retention outside the local store.
- Configuration lists settings and defaults.
- Daemon lifecycle explains services, credentials, and config changes.
The optional planner service ranks entries for prefetch. Start with a storage backend; exact-key lookups work without that service.