Question: how is lru cache implemented?
Answer: LRU Cache Implementation An LRU cache is built by combining two data structures: a doubly linked list and a hash map. This lets us access the LRU element in O ( 1 ) O(1) O(1) time by looking at the tail of the list. ... But the whole point of a cache is to get quick lookups.