Skip to content
Skip to Content
Remote cache

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…UseSetup
An S3-compatible bucket, including AWS S3, R2, or MinIOs3S3 setup
A Google Cloud Storage bucketgcsGCS setup
A directory mounted on each machinefilesystemFilesystem setup
An OCI registry such as GHCRociOCI 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

The optional planner service ranks entries for prefetch. Start with a storage backend; exact-key lookups work without that service.

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux
Download Kunobi