Documentation ¶
Index ¶
- func Get(key interface{}) (interface{}, error)
- func GetOrSetFunc(key interface{}, f func() (interface{}, error), duration time.Duration) (interface{}, error)
- func GetOrSetFuncLock(key interface{}, f func() (interface{}, error), duration time.Duration) (interface{}, error)
- func Remove(key interface{}) error
- func Set(key, value interface{}, duration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrSetFunc ¶
func GetOrSetFunc(key interface{}, f func() (interface{}, error), duration time.Duration) (interface{}, error)
获取一个缓存值,当缓存不存在时执行指定的函数
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.