AI engineering glossary · Data structures algorithms
What is LRU cache?
LRU cache (also called least recently used cache): A fixed-size cache that, when full, removes the item that was used least recently. It is commonly built from a hash table plus a doubly linked list so both lookup and update take constant time.
LRU cache: an example
With capacity 3 holding pages A, B, C where A was used longest ago, adding D evicts A.
Related terms
More Data structures algorithms terms
- Master theorem
- Memoization
- Merge sort
- Minimum spanning tree
- Monotonic stack
- NP-complete
- Open addressing
- Optimal substructure
Where you learn it
LRU cache is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.