Cache LRU (Least Recently Used) mengeluarkan item yang belum diakses selama waktu paling lama ketika mencapai kapasitas. Desain klasik menggabungkan hash map (pencarian O(1)) dengan doubly linked list (pengurutan ulang O(1)), memberikan get dan put O(1).
Desain dua struktur
HashMap: key -> node DLL (recency order):
MRU <-> ... <-> LRU
get/put: map finds node move touched node to front (MRU)
in O(1); DLL splices it evict the tail (LRU) when full
to the front in O(1)
