forked from p93542168/wheat-cache
perf(lru): add the sync.Once to define
This commit is contained in:
parent
75e1251d22
commit
71ddeb4772
|
@ -1,10 +1,16 @@
|
|||
package lru
|
||||
|
||||
import "sync"
|
||||
|
||||
type SingleWorkFunc func() interface{}
|
||||
|
||||
const (
|
||||
OpEventName = "operateEvent"
|
||||
CleEventName = "clearEvent"
|
||||
|
||||
WorkFuncEventCtxKey = "workFunc"
|
||||
WorkFuncEventKey = "workFunc"
|
||||
)
|
||||
|
||||
var (
|
||||
lruCacheOnce sync.Once
|
||||
lruCache *singleCache
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue