dhyanio / discache

Simple, Fast, and Distributed Cache Server in Go
MIT License
4 stars 0 forks source link

Add LFU (Least Frequently Used) algo in cache #3

Open dhyanio opened 2 days ago

dhyanio commented 2 days ago

An LRU (Least Recently Used) cache is widely used for its simplicity and effectiveness in managing limited resources. However, there are scenarios where other caching algorithms might perform better depending on your requirements. So Discache must have other algo capabilities for tacking other use cases effectively.

dhyanio commented 2 days ago

LFU (Least Frequently Used) When to use: Access patterns have frequent usage of specific keys, and recently used data isn't always the most important. How it works: Evicts the least frequently accessed items, regardless of recency. Benefits:

Drawbacks: More complex to implement and manage than LRU.