engine/cache/mem/mem.go

15 lines
277 B
Go
Raw Normal View History

2024-02-11 01:31:01 +08:00
package mem
import (
"git.apinb.com/bsm-sdk/engine/vars"
"github.com/FishGoddess/cachego"
)
func New() cachego.Cache {
return cachego.NewCache(
cachego.WithGC(vars.MemGcDuration),
cachego.WithShardings(vars.MemShardings),
cachego.WithLFU(vars.MemLRUMaxNumber),
)
}