Skip to content

git-hulk/go-lru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-lru Go Report Card Build Status

go-lru is an MIT-licensed Go LRU cache bases on GroupCache, with expire time supported

Example

Set key with expire time

cache := NewCache(100) // max entries in cache is 100
cache.Set("a", 1234, 1) // key "a" would be expired after 1 second

Set key without expire time

cache := NewCache(100)
cache.Set("a", 1234) // set key "a" without expire time

API doc

API documentation is available via https://godoc.org/github.com/git-hulk/go-lru

Releases

No releases published

Packages

No packages published

Languages