package
0.0.0-20231108073916-93b22619600a
Repository: https://github.com/kdcer/go-lib.git
Documentation: pkg.go.dev

# Functions

Contains returns true if <key> exists in the cache, or else returns false.
Data returns a copy of all key-value pairs in the cache as map type.
Get returns the value of <key>.
GetOrSet returns the value of <key>, or sets <key>-<value> pair and returns <value> if <key> does not exist in the cache.
GetOrSetFunc returns the value of <key>, or sets <key> with result of function <f> and returns its result if <key> does not exist in the cache.
GetOrSetFuncLock returns the value of <key>, or sets <key> with result of function <f> and returns its result if <key> does not exist in the cache.
Keys returns all keys in the cache as slice.
KeyStrings returns all keys in the cache as string slice.
New creates and returns a new cache object.
No description provided by the author
Remove deletes the <key> in the cache, and returns its value.
Removes deletes <keys> in the cache.
Set sets cache with <key>-<value> pair, which is expired after <duration>.
SetIfNotExist sets cache with <key>-<value> pair if <key> does not exist in the cache, which is expired after <duration>.
Sets batch sets cache with key-value pairs by <data>, which is expired after <duration>.
Size returns the size of the cache.
Values returns all values in the cache as slice.

# Constants

2020-2-15 删除事件.
=============移除原因============= 2020-2-15 失效事件.
2020-2-15 没空间事件.

# Structs

Cache struct.

# Type aliases

2020-2-15 移除监听.
No description provided by the author