Skip to content
Latchkey

What Is a Negative Cache?

A negative cache records the absence of a result, such as a not-found lookup or a known build miss, so identical future queries are answered from the cache rather than retried. It saves the cost of repeatedly performing an operation that is known to fail or return nothing. Negative entries usually carry a short expiry to recover once the value appears.

Why it matters

Without negative caching, a stream of requests for something that does not exist keeps hitting the expensive backend every time. Caching the miss converts that into a cheap lookup, protecting the backend from useless load. The risk is staleness: too long a negative TTL hides a value that has since been created.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →