wheat-cache/pkg/lru/define.go

17 lines
225 B
Go
Raw Normal View History

2021-09-21 19:28:14 +08:00
package lru
2021-09-27 11:29:47 +08:00
2021-10-04 16:25:09 +08:00
import "sync"
2021-09-27 11:29:47 +08:00
type SingleWorkFunc func() interface{}
const (
OpEventName = "operateEvent"
CleEventName = "clearEvent"
2021-10-04 16:25:09 +08:00
WorkFuncEventKey = "workFunc"
)
2021-09-27 11:29:47 +08:00
2021-10-04 16:25:09 +08:00
var (
lruCacheOnce sync.Once
lruCache *singleCache
2021-09-27 11:29:47 +08:00
)