Skip to content
#

lfu

Here are 35 public repositories matching this topic...

erwanor
erwanor 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

enhancement good first issue v2 LFU

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