Build cache
Each environment of an app keeps one build cache under its own data (apps/<id>/<env>/build-cache/<key>/), keyed by a hash of Cargo.lock, bun.lock and the toolchain pins. CARGO_TARGET_DIR points into it and ~/.exact in the build's home links to its exact/, so a second deploy of an unchanged Rust app skips the compile. A changed key starts a fresh directory and removes the old one.
- Previews have their own cache; they never read or write production's.
- The cache is writable in the build's cell, so it counts toward the step's disk limit. Uncontained hosts get
CARGO_TARGET_DIRonly (HOME is the forge's and is left alone). - The app page shows its size to the repository's admins with a Clear button (
POST /:owner/:name/app/cache/clear, same-origin form); after it the next deploy builds from scratch. - The size is noted after each build, not measured on page view.
- The cache's bytes are added to the app's disk sample (
sampleStorage), the figure the app page and the quota read. - Clear is refused while any environment of the app is deploying (its build holds the cache); the page and the terminal say so.
- Terminal door:
src/tui/screens/buildcache.ts, palette entry "Build cache" for a repository's admins (cclears, after a confirm), through the sameclearCache.app.cache.clearedis an admins' event and redraws an open app page.