Kache 2.1.1 reuses more Rust and C/C++ work across worktrees, profiles and terminal settings. It also adds native compiler launchers, build-script recovery and bounded remote uploads.
cargo install kache --locked --version 2.1.1
kache init
kache doctor --probeHighlights
- Share compatible entries between terminal and piped builds, inherited development profiles, and more worktree layouts.
- Fix the C/C++ memo ordering bug that made unchanged hits preprocess again and rewrite their input records.
- Bound compressed upload buffers and retry attempts while preserving local results when a remote upload fails.
Added
- Compiler launchers: Cargo installs and release archives include
kache-clang-clandkache-clfor build systems that require a single executable inCCorCXX. Launchers retain their role after renaming.clang-clremains cacheable; MSVCclpasses through uncached. #1827, #1830 by @jleni. - Build-script recovery: on Linux and macOS,
kache doctor --repair-build-scripts <TARGET_DIR>can refresh verified target-local runtime pins that are missing their engine companion. It refuses busy targets and corrupt records. #1829 by @jleni. - Build reports: scheduler waits now show recorded admission outcomes and capacity evidence in stats, JSON and traces.
explaincompares matching compilation units and identifies imported incremental profiles. #1842, #1806, #1874 by @jleni and @ZackKanter.
Fixed
- Linux musl packages: fix the deprecated timestamp alias that blocked x64 and ARM64 builds. #1893 by @jleni.
- Rust reuse: share compatible entries across terminal widths and
dev-derived profiles, keep unusedOUT_DIRvalues out of trybuild keys, and recognize earlier lockfiles on Windows CRLF checkouts. Diagnostic locations map back to real files in the current checkout. Incompatible worktrees release discovery waits before compiling their own unit. #1841, #1874, #1879 by @jleni and @skyf0l. - C/C++ reuse: read memo inputs in capture order and reject stale header-availability proofs. Also accept Windows SDK macro names containing
$and supportedcc-crate musl flags. #1885, #1820, #1840 by @jleni, @TastyCZ and @skyf0l. - Build-script correctness: prevent concurrent launcher installs from preserving another launcher, key external native-link inputs by content, and follow Git HEAD changes and linked-worktree Git paths. #1814, #1864, #1874 by @jleni and @ainhoa-a.
- Incremental builds: manage eligible unhashed libraries and Cargo 1.100 binary units in adaptive mode. Managed private incremental builds can forward validated metadata before code generation finishes, including on supported stable Rust. Adaptive mode and worktree seeding remain enabled by default;
cache.seed_incremental = falsedisables seeding. #1817, #1865, #1869 by @jleni and @coroiu. - Windows and startup: accept inherited Windows environment entries, avoid repeated daemon recovery for local-only fallbacks, and reuse guarded MSVC tool digests. Login-service startup verifies that the service owns the requested runtime. #1805, #1826, #1867, #1868, #1880 by @jleni, @Veykril and @TastyCZ.
- Linux service startup: recognize the systemd user manager's home as the service's default working directory, so a matching cache instance starts through its installed service. #1891 by @TastyCZ and @jleni.
- Cleanup: remove renamed targets' unused outputs, release Cargo target leases on exit, preserve live process identities and macOS permit wakes, and prune idle scheduler/key locks. Cleanup also keeps recently run target tools; ZFS restores use filesystem-compatible timestamps. #1818, #1838, #1839, #1848, #1874 by @ainhoa-a, @jleni, @CheckPickerUpper and @TastyCZ.
- Cache maintenance: repair malformed entry metadata without deleting another entry's shared blobs. Abort orphan cleanup before deleting files when a live-reference query fails. Idle durability polling uses an index instead of repeated full-table scans. #1816, #1884, #1805 by @jleni, @CheckPickerUpper and @Veykril.
- Remote transfers: import restored entries off async workers and retain their ownership through cancellation. Failed uploads have bounded attempts and keep their local cached result. #1849, #1860 by @jleni and @skyf0l.
- Tool routing: bound recursive Cargo fallback chains, skip C-compiler probing for Kache CLI names, and restore compatibility with current Blaze executable names. Blaze routing remains optional and off by default. #1835, #1837, #1821 by @ainhoa-a, @jleni, @TastyCZ and @ZackKanter.
- Rust tool diagnostics:
kache doctordiagnoses Cargo and rustdoc fallback loops through version-manager shims. On Unix,kache initalso checks the Rust shim path it will install. Activate Rust in your version manager, or setKACHE_REAL_CARGOandKACHE_REAL_RUSTDOCto working executables; rustup proxies are supported.KACHE_REAL_RUSTDOCselects the tool behind Kache's shim and leaves Cargo'sbuild.rustdocsetting intact. #1886 by @jleni. - Nix: provide the system SQLite, zstd and pkg-config inputs required by current Cargo hooks. #1882 by @jleni and @mawkler.
Configuration
Configure these settings with TOML or kache config set. The configuration reference lists their supported environment aliases.
| Setting | Default | Controls |
|---|---|---|
cache.remote_upload_memory_bytes
| 1GiB
| Shared compressed upload-buffer budget |
cache.remote_upload_max_attempts
| 5
| Attempts per background upload, including the first |
cache.remote_upload_timeout_secs
| 300
| S3 upload response timeout |
cache.event_archive_days
| 8
| Archived build-history retention |
cache.event_archive_max_size
| 512MiB
| Archived build-history size |
cache.count_held_in_max_size
| false
| Count cache bytes still held by build outputs toward the GC target |
cache.build_script_omit_cargo_source_dir_mtime
| false
| Omit Cargo source-directory timestamps from build-script keys |
Packs larger than the upload-buffer budget stay local; the budget covers compressed buffers, not all daemon memory. Size settings accept units such as 512MiB and 1GiB. The source-directory option is off by default: enable it only for scripts that do not read those directory timestamps. File contents and times remain keyed.
#1860, #1863, #1874, #1816, #1881 by @jleni, @CheckPickerUpper and @ainhoa-a. See the configuration reference.
Security
- SQLite: update the bundled library to SQLite 3.54.1, addressing RUSTSEC-2026-0459. System-library builds use their installed SQLite. #1873 by @jleni.
Upgrading
- Cache keys move from version 33 to 34, and old C/C++ object recipes are retired. Expect misses while local and remote caches refill after the upgrade. No manual cache deletion is required.
- Keep matching
kacheandkache-enginebinaries together. Existing target-local build-script launchers retain their old runtime pins;initdoes not replace them. Use the repair command for valid pins, or follow the package recovery guide for corrupt launchers. - Custom debugger source maps for generated files should include the new
/kache/profileprefix. See cache-key portability.
Contributors
Credits include authors and coauthors of adopted contributions.
@ainhoa-a · @CheckPickerUpper · @coroiu · @jleni · @mawkler · @skyf0l · @TastyCZ · @Veykril · @ZackKanter
Full changelog: v2.0.0...v2.1.1