---
title: "Comment by Osinachi Chukwujama  on \"Node.Js with Livia || Caching In Node.Js:  Optimizing Performance (Part I)\" | Hashnode"
description: "Nice article Olivia! Is there a substantial difference between Least Recently Used (LRU) and Least Frequently Used (LFU) cache eviction strategies?"
url: "https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e/comment/646a26a5264da515c75b64fb"
---

[Discussion](https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e)

Comment [Node.Js with Livia || Caching In Node.Js: Optimizing Performance (Part I)](https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e)

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[May 21, 2023](https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e/comment/646a26a5264da515c75b64fb)

Nice article Olivia!

Is there a substantial difference between Least Recently Used (LRU) and Least Frequently Used (LFU) cache eviction strategies?

[Olivia Oputa](https://hashnode.com/@oputaolivia)

[May 21, 2023](https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e/comment/646a26a5264da515c75b64fb#reply-646a38d7264da515c75b6685)

Alright Let me use web pages to illustrate the difference. You know our browsers show us the pages we visited last and the frequently visited sites. In LFU, the page with the least visit within a given period of time is removed. In the LRU, I think this is when queue operation comes in but not exactly FIFO because when there is a repetition the first isn’t exactly evicted the repeated page is just seen as the most recent.

Basically from my all my reads and research LRU are used for small caches, LFU are mostly used for robust caches

Honestly wish I could use a VN for this 😂 I just hope you understood the whole idea, and if I am not right please feel free to drop your thoughts.

[Osinachi Chukwujama](https://hashnode.com/@Vicradon)

[May 21, 2023](https://hashnode.com/posts/caching-in-nodejs/646a16d7862193399cb6c83e/comment/646a26a5264da515c75b64fb#reply-646a3d4e264da515c75b66e7)

[Olivia Oputa](https://hashnode.com/@oputaolivia) I understand better now. Thank you.

LRUs focus on the most recently accessed items. LFUs focus on the most frequently accessed items.

It's like two different arrays each undergoing an eviction process based on how much the items are accessed.
