Dependencies

This commit is contained in:
Jakob Borg
2014-10-16 14:58:11 +02:00
parent 5488ae5b89
commit e82e912151
5 changed files with 266 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
A simple LFU cache for golang. Based on the paper [An O(1) algorithm for implementing the LFU cache eviction scheme](http://dhruvbird.com/lfu.pdf).
Usage:
```go
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)
```