Skip to content

dgrijalva/lfu-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 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

Releases

No releases published

Packages

No packages published

Languages