An LRU cache bounds memory used by reusable data. Give it a maximum entry count, then evict entries by last access time when capacity is reached, preserving recently used entries while preventing unbounded growth. section 5.2.3
Use LRU eviction for state that improves responsiveness but need not remain resident forever, such as document caches. It is one safeguard within a broader memory strategy that also limits undo stacks and monitors consumption over extended use. section 5.2.3
Apply LRU caching as an operational memory control:
- Set an explicit maximum entry count rather than allowing cached data to grow indefinitely. section 5.2.3
- Evict cached documents according to last access time when the bound is exceeded. section 5.2.3
- Track memory consumption over time and test day-long usage patterns for growth that suggests leaks. section 5.2.3




