cache:Mango Cache :mango: - 在 Go (golang) 中部分实现 Guava Cache

时间:2021-07-24 06:36:03
【文件属性】:
文件名称:cache:Mango Cache :mango: - 在 Go (golang) 中部分实现 Guava Cache
文件大小:100KB
文件格式:ZIP
更新时间:2021-07-24 06:36:03
golang cache lru tinylfu slru 芒果缓存 Go 中部分实现。 支持的缓存替换策略: LRU 分段 LRU(默认) TinyLFU(实验性) TinyLFU 实现的灵感来自 Ben Manes 的和 Damian Gryski 的 tinylfu。 下载 go get -u github.com/goburrow/cache 例子 package main import ( "fmt" "math/rand" "time" "github.com/goburrow/cache" ) func main () { load := func ( k cache. Key ) (cache. Value , error ) { time . Sleep ( 100 * time . Millisecond ) // Slow task return fmt . Sprintf ( "%d" ,

网友评论