Pointer juggling, ordered structures, and O(1) reordering tricks.
Design a fixed-size cache that evicts the least-recently-used key — all in O(1).
Flip every next pointer with three pointers: prev, curr, next.