Roko AI · ANATOMY中文

LRU cache eviction

Tushar | Vaani AI Research · Original post

Video explanation

Lettered blocks reorder across four slots. Hits move a block to the recent end; misses at full capacity evict the least recently used block.

Hits update recency

Accessing an existing key returns its data and refreshes its recency position.

Eviction at capacity

A new key needs space at capacity. LRU evicts the least recently accessed entry rather than necessarily the oldest insertion.

Access patterns matter

Hit rate depends on the request sequence and capacity. Mechanical movement represents data-structure operations, not physical blocks.

Further reading

Related videos