Spent the day going down the rabbit hole of LRU

Arpit Bhayani

Arpit Bhayani

Aug 15, 2025 • 1 min read


Spent the day going down the rabbit hole of LRU and exploring different variants, each optimized for a certain class of workloads.

Here are 5 that I explored today. btw, there are 50 more to explore, but I am not going to do that as I found what I was looking for.

  1. LRU-K - tracks K recent reference times
  2. TLRU - adds TTL-based eviction to LRU
  3. EELRU - predictive eviction before the cache fills
  4. LRFU - combines recency with frequency weighting
  5. SLRU - separates protected and probationary segments

If you find this interesting, you can use your favorite LLM to dig deeper.

Btw, I never read without a purpose. I picked this topic because I wanted to see if I could spot a gap in existing implementations and identify something that could be exploited and improved for certain workloads.

Digging deeper into one topic makes you realize that everything is a rabbit hole, no exceptions.

Arpit Bhayani

Principal Engineer II at Razorpay - building Agent Studio, Ex-staff engg at GCP Memorystore & Dataproc, Creator of DiceDB, ex-Amazon Fast Data, ex-Director of Engg. SRE and Data Engineering at Unacademy. I spark engineering curiosity through my no-fluff engineering videos on YouTube and my courses