<b>This week in caching: caching the absence of things</b>
The underrated half: caching 404s, empty results, and errors:
— <i>Negative caching to stop origin abuse</i> — caching 404s briefly so a scanner hitting 10k bad URLs doesn't pummel your backend.
— <i>The empty-result cache</i> — memoizing 'no rows' so a query that returns nothing doesn't re-run on every request; the bug that hides as 'cache only helps for popular items.'
— <i>Caching 5xx is a trap</i> — why a short error TTL helps but a long one cements an outage.
— <i>Null-object pattern in app caches</i> — distinguishing 'not cached' from 'cached as nothing' to avoid re-querying.
Credits: the AWS caching whitepaper and various Stack Overflow postmortems.
Bookmark: the null-vs-miss distinction — the subtle bug that quietly halves your hit rate.
Cache Catch
@CacheCatch
<b>This week in caching: caching the absence of things</b>
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.