123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- package cache
- type Key interface{}
- type Value interface{}
- type Cache interface {
-
-
- GetIfPresent(Key) (Value, bool)
-
-
- Put(Key, Value)
-
- Invalidate(Key)
-
- InvalidateAll()
-
- Stats(*Stats)
-
-
-
- Close() error
- }
- type Func func(Key, Value)
- type LoadingCache interface {
- Cache
-
-
- Get(Key) (Value, error)
-
-
-
- Refresh(Key)
- }
- type LoaderFunc func(Key) (Value, error)
- type Executor interface {
-
- Execute(fn func())
-
- Close() error
- }
|