# Rivox Caching Subsystem
Rivox implements a high-performance Content-Addressed Storage (CAS) caching architecture designed to eliminate redundant CI installs and build steps across monorepos.
---
## Subtree Merkle Key Derivation (RFC-001)
Unlike Nix's input-addressed store path defaults, Rivox hashes resolved output identities and transitive dependency Merkle roots:
$$\text{CacheKey}(N) = \text{SHA-256}\Big( N.\text{ecosystem} \mathbin{\Vert} N.\text{package} \mathbin{\Vert} N.\text{version} \mathbin{\Vert} \text{MerkleRoot}(\text{Deps}(N)) \mathbin{\Vert} \text{Arch} \Big)$$
This ensures that editing an unrelated package in `uv.lock` or `Cargo.lock` does **not** invalidate cache keys for unrelated packages in the workspace.
See also: [cas.md](cas.md), [performance.md](performance.md).