When One Cache Isn’t Enough: Diagnosing a Bidirectional Expiry Bug Humans and AI Both Miss
🧩 TL;DR: A subtle expireAfterAccess bug in a dual-cache setup caused thousands of evictions in a small cache — even for reused keys. The root cause? Only one side of the bidirectional cache was touched on read, leading to silent expiry in the reverse map. This engineering postmortem breaks down how different experience levels (from …