Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.
/ lfu-go Public archive
forked from dgrijalva/lfu-go

A least frequently used cache for Golang

License

Notifications You must be signed in to change notification settings

pyroscope-io/lfu-go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple LFU cache for golang. Based on the paper An O(1) algorithm for implementing the LFU cache eviction scheme.

Usage:

import "github.com/dgrijalva/lfu-go"

// Make a new thing
c := lfu.New()

// Set some values
c.Set("myKey", myValue)

// Retrieve some values
myValue = c.Get("myKey")

// Evict some values
c.Evict(1)

About

A least frequently used cache for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%