CommitBrief uses SHA-256 content addressing to cache LLM code reviews at zero cost
CommitBrief, a tool that automates code review using large language models, caches every LLM response to eliminate redundant API calls and associated costs. Each cache entry is keyed by a SHA-256 hash of all inputs that affect the output, including the diff, system prompt, model, provider, language, and schema version. Because the key is derived entirely from the inputs, any change automatically produces a new key, making stale cache entries impossible without any explicit invalidation logic. Cache hits are resolved through a simple disk read and JSON unmarshal, bypassing token usage and cost estimation entirely. The design also ensures that adding new optional features does not invalidate existing cache entries, since new parameters only extend the key when present.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in