Skip to content
/ lru4go Public

LRU cache implementation based on go, supports expiration time

Notifications You must be signed in to change notification settings

yiekue/lru4go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lru4go

使用golang实现的LRU缓存.

example:

cache := lru4go.New(2000)
cache.Set("key","value")
cache.Set("ttl","20 second")
if v, ok:=cache.Get(key); !ok {
    fmt.Println("get failed:", ok.Error())
}
_ := cache.Delete("ttl")
cache.Reset()
cache.Set("key","value")

About

LRU cache implementation based on go, supports expiration time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages