Build and run CI pipelines anywhere, consistently. fluentci.io
fluentci cache README.md
43 kB · 699 lines
Markdown
at main

# fluentci-cache A standalone Rust build-cache server built on Tokio, Axum, and `object_store`. One service handles multiple build tools, with isolated storage namespaces and an S3-compatible backend by default. Writes require a token. Reads are public by default and can be made private at the server. S3 deployments require a public CDN base URL for object reads. Configuration comes from TOML, environment variables, or CLI flags. ## Account URLs Use `https://cache.fluentci.io/did:plc:YOUR_DID` as a stable account base URL, or `https://cache.fluentci.io/your.handle` as a readable alias. The `https://cache.fluentci.io/@your.handle` form works too. HTTP endpoints append their protocol path, such as `/nix`, `/bazel`, `/gradle`, or `/turbo`. Both handle forms resolve to the `accounts/<owner-did>` storage namespace. Existing `/accounts/<owner-hash>` URLs, artifacts, and upload tokens keep working. Existing storage is copied to DID namespaces by the migration described below. DID URLs resolve locally; handles are verified through the public `io.fluentci.cache.resolveAccount` query and cached for 60 seconds. Writes remain scoped to the owner DID and require the same upload token. Use DID URLs in CI because a handle can change ownership. Both token response URLs use the owner DID. gRPC instance names use `accounts/<owner-did>`. OCI repository names use the reversible `did-plc-YOUR_DID` form because colons are forbidden there; `did:web` suffixes are UTF-8 hex encoded after `did-web-`. Stored keys always use the full DID. Legacy hash URLs are resolved through retained token-owner records. The resolver defaults to `https://api.fluentci.io/xrpc/io.fluentci.cache.resolveAccount`; configure `FLUENTCI_CACHE_IDENTITY_RESOLVER_URL` (TOML `identity_resolver_url`) when hosting your own API. It must be a trusted HTTPS endpoint, without credentials or query parameters. Local HTTP fixtures additionally require `allow_http = true`. ## Quick start From the repository root: Install the Protocol Buffers compiler (`protoc`) before …