A cache entry is one stored, key-associated item or computed result held for reuse. Entries consume finite storage, so a cache cannot grow indefinitely. section 7.3
Managing entries requires balancing capacity, lookup cost, and usefulness:
- Adding entries eventually saturates the cache, requiring existing entries to be purged. section 7.3
- The ideal eviction target is an entry unlikely to be requested again, although future demand cannot be predicted exactly. section 7.3
- Recent access provides a practical heuristic: an entry unused for a long time may be stale and less valuable. section 7.3
A cache for a billion walls
Storing only the top 50 post IDs for each of a billion walls could require about a terabyte. As entries accumulate, RAM becomes insufficient and checking a larger cache can become slower. section 7.3
