Kache is a build cache system for Rust and C/C++ that acts as a transparent compiler wrapper (via RUSTC_WRAPPER or as a drop-in for cc/c++). It caches compilation artifacts using content-addressed storage with Blake3 hashing, enabling zero-copy restoration via reflinks/hardlinks/copies. The system features a daemon for asynchronous remote operations (S3/filesystem), a CLI/TUI for cache management and monitoring, and advanced capabilities like dependency chain analysis for cache misses, extra inputs for user-defined cache key influences, and predictive prefetching. Architecture-wise, it consists of a compiler wrapper core, a background daemon, a remote planning service (kache-service), and extensive testing/benchmarking harnesses. The code demonstrates strong craftsmanship in areas like cache key normalization, zero-copy restoration strategies, and compiler abstraction patterns.
This repository is a GitHub Action written in TypeScript that installs and configures Mozilla's sccache compilation cache inside GitHub Actions workflows. The main entry point (src/setup.ts) reads a version input; if none is given, it queries the GitHub API for the latest sccache release. It then downloads the platform-specific binary from sccache's GitHub releases, verifies the downloaded archive's SHA-256 checksum against the released .sha256 sidecar, extracts it, caches it in the Actions tool directory, adds it to PATH, exports SCCACHE_PATH, and sets ACTIONS_CACHE_SERVICE_V2 plus result URL/token environment variables so sccache can use GitHub Actions cache as its backend. A post step (src/show_stats.ts) runs `sccache --show-stats --stats-format=json`, parses the output, and posts a job annotation and job summary with cache hit/miss/error counts, hit ratio, and durations. Architecturally this is a small two-entry-point action bundled with ncc. The source is strict TypeScript with ESLint, Prettier, and a CI workflow that verifies committed dist bundles match a clean rebuild. It has no real unit tests (jest runs with --passWithNoTests) and a few minor flaws: the zip-extraction branch is dead code because getExtension() always returns 'tar.gz'; unsupported architectures/platforms produce malformed download URLs rather than clean failures; and the displayed cache percentage shows 0% when there are zero requests (e.g., no cache hits). Despite these issues, the code is clear, uses byte-level checksum verification, handles sccache's missing trailing newline in JSON output, and integrates well with GitHub's logging and summary APIs. It is an actively maintained, low-drift repository.