The Wayback Machine - https://web.archive.org/web/20210726011549/https://github.com/topics/lfu
Skip to content
#

lfu

Here are 31 public repositories matching this topic...

aaronwinter
aaronwinter commented May 1, 2018

Consider an LFU cache with capacity=10 i.e

gc, err := gcache.New(10).LFU().Build()

The internal cache.freqList is a linked list. Each of its entries represent a given frequency along with a map (bucket) with all the items with such frequency.

The issue is that we never clean-up empty entries, over time the list grows larger and larger. It's not great.

Example:

W

Improve this page

Add a description, image, and links to the lfu topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the lfu topic, visit your repo's landing page and select "manage topics."

Learn more