Cache LRU (Least Recently Used) shine abin da zai cire abin da ba a ɗaukar lura a cikin girma na gida lokacin da ya kai ƙarfin sa. Tsarin gida yana haɗa hash map (O(1) bincike) tare da doubly linked list (O(1) sake-jera), wanda ke ba O(1) get da put.
The two-structure design
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)
