akhalikoff/cachelot — Issue #1: Implement LRU cache
Author: akhalikoff
Created: 2011-11-27 11:32:24+00:00
State: open

http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used

Least Recently Used (LRU): discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require keeping "age bits" for cache-lines and track the "Least Recently Used" cache-line based on age-bits. In such implementation, every time a cache-line is used, the age of all other cache-lines changes.