Versions in this module Expand all Collapse all v1 v1.13.12 Feb 9, 2025 Changes in this version + func RegisterNewGroupHook(fn func(*Group)) + type CacheStats struct + Gets int64 + Hits int64 + Items int64 + type Context = interface + type GetterFunc = func(ctx Context, key Key) (val Value, err error) + type Group struct + func GetGroup(name string) *Group + func NewGroup(name string, cacheNum int, getter GetterFunc, onEvicted ...OnEvictedFunc) *Group + func (g *Group) CacheStats() CacheStats + func (g *Group) Get(ctx Context, key Key) (val Value, err error) + func (g *Group) Name() string + func (g *Group) TryGet(key Key) (val Value, ok bool) + type Key = lru.Key + type OnEvictedFunc = func(key Key, value Value) + type Value = interface