jargon

Comparison

Cache warmingvsNegative caching

Cache warming

you populate the cache before you send real traffic at it, so the first users after a deploy do not eat every miss.

Loading likely-needed entries into a cold cache ahead of serving. It matters most where an empty cache means the origin cannot survive the resulting load, which is common after a restart, a failover, or a deploy that changes the key format. Warming is also what you skip and then rediscover during an incident, when the cache is empty for a completely different reason.

Full entry →

Negative caching

you cache the fact that the thing does not exist, so a bad id cannot hit the database on every single retry.

Storing a marker for a miss so that repeated lookups of an absent key are served from cache. Without it, any key that never resolves is a permanent cache bypass, which is both a performance problem and an easy denial-of-service vector. Keep the negative TTL short, or a newly created record stays invisible for as long as the marker lives.

Full entry →

Related comparisons