- 支持设置最大容量
- 10s触发一次检查,删掉超过容量的数据
- 三天未使用的key会被删除
go get github.com/kangkang66/go-lru
cache := NewCache(10)
cache.StoreOrUpdate("config_key", 1, "com.app.name", []byte(`{"name":"zhangsan"}`))
value,err := cache.Get("config_key", 1, "com.app.name")
data := cache.AllData()