An LLM review costs money and a few seconds of latency. Reviewing the same diff twice should cost neither. CommitBrief caches every review, but the interesting part isn't that it caches — it's that the cache is content-addressed, so a hit is provably the same review, and there is no such thing as a stale one. Editing a single line of your rules file invalidates exactly the entries it should, and not one more, with zero invalidation logic anywhere in the code.

TL;DR

The cache key is a SHA-256 of everything that determines the answer: the diff, the full system prompt, the provider, the model, the language, and a schema version.

A hit is a disk read — no tokens, no cost, and the cost preflight is skipped entirely.

Invalidation is emergent. Change an input, the key changes, the old entry is never looked up again. Nobody writes "clear cache on rules edit."