A cache eviction policy that removes the entry that has not been used for the longest time. It is used in memory caches, databases and operating systems to keep the most recently accessed data in limited space, while stale entries are discarded when capacity is needed.
What Least Recently Used Cache Means in Practice
Least Recently Used, or LRU, is a cache eviction rule, not a cache type. It keeps recently accessed entries resident and discards the one that has been idle the longest when space is needed. That makes it effective when recent access is a good predictor of near-future access, which is common in memory systems, database buffers, and operating system caches.
Why LRU Fits Limited-Capacity Systems
LRU exists to balance speed against memory limits. A cache can only retain so much data, so the eviction policy determines which data gets a second chance and which data is dropped. LRU tends to preserve locality of reference, meaning hot items stay available while cold items are pushed out. That improves hit rates when workloads revisit the same records, pages, or objects repeatedly.
Its strength is also its limitation: LRU assumes that the most recently used item is the most likely to be reused again soon. When access patterns are bursty, highly sequential, or skewed by one-off scans, LRU can retain data that will not be needed again and evict entries that would have been useful later.
Where LRU Is Used and How It Behaves
Operating systems use LRU-like logic for page and file caching, databases use it for buffer pools, and application caches use it to manage objects, sessions, or computed results. In all cases, the policy is about graceful degradation under pressure: when the cache is full, the least recently touched entry is the first candidate for removal.
True LRU can be expensive at scale because every access must update recency state. For that reason, many systems use approximations such as segmented LRU, clock, or hybrid eviction schemes. These variants keep the same design goal, but reduce bookkeeping overhead or better handle mixed workloads.
Operational Trade-offs and Tuning Considerations
LRU is usually a good default when access locality is stable and the working set fits reasonably well within cache capacity. It is less effective when a workload alternates between multiple hot sets, streams through large datasets, or repeatedly touches large objects that should not displace smaller high-value entries. In those cases, a different policy or a larger cache may produce better results.
Practitioners usually evaluate LRU by looking at hit ratio, eviction rate, and the shape of the workload rather than treating the policy as universally optimal. The key question is whether recency is a reliable proxy for future use in that specific system.
Risk and Threat Considerations
LRU is normally a performance mechanism, but poor cache policy decisions can create availability and efficiency risk. If an application depends on a cache for latency control, inefficient eviction can increase backend load, raise response times, and amplify resource consumption under traffic spikes or scan-heavy workloads.
Failure mechanism: A workload with large sequential reads or churny access can displace genuinely hot entries, causing repeated misses, extra database or disk traffic, and avoidable thrashing.
Impact: The result can be degraded throughput, higher infrastructure cost, and in worst cases a cascading performance problem when downstream systems are forced to absorb traffic the cache should have absorbed.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.PS-01 — Configuration Management | Cache eviction policy is part of performance-safe system configuration. |
| PR.IR-01 — Network Resilience | Efficient caching supports service resilience by reducing backend pressure. | |
| Recommendation — Tune cache policy to preserve desired performance under expected workload patterns. Adjust caching behavior to sustain service performance during load spikes. | ||
| NIST SP 800-53 Rev 5 | SC-5 — Denial of Service Protection | Cache thrash can amplify resource consumption and degrade service availability. |
| Recommendation — Use caching controls that limit avoidable resource exhaustion under heavy access. | ||
Practitioner Guidance
What to watch for: LRU should be validated against the workload, not assumed to be ideal. If hit rates fall during scans, batch jobs, or multi-tenant traffic, the cache may be serving recency poorly for that access pattern. In those cases, the better answer may be policy tuning, cache segmentation, admission control, or a different eviction strategy rather than treating LRU as a fixed default.
Related resources from NHI Mgmt Group
- Who is accountable for enforcing least privilege when zero trust and access orchestration are used together?
- What happens when Infrastructure as Code is used without least privilege and secret scanning?
- What breaks when hidden-state or KV-cache transfers are used without transport-layer integrity checks?
- What signs suggest a cache parser is being used outside its safe boundary?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org