Skip to content
#

tinylfu

Here are 7 public repositories matching this topic...

Language: All
Filter by language
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 tinylfu 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 tinylfu topic, visit your repo's landing page and select "manage topics."

Learn more