Files
syncthing-arm/Godeps/_workspace/src/github.com/AudriusButkevicius/lfu-go
2014-10-16 14:58:11 +02:00
..
2014-10-16 14:58:11 +02:00
2014-10-16 14:58:11 +02:00
2014-10-16 14:58:11 +02:00
2014-10-16 14:58:11 +02:00

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)