Documentation ¶
Index ¶
- Constants
- Variables
- func CheckError(err error)
- func Forget(key string) bool
- func Has(key string) bool
- func Init(adapterName string, opt map[string]interface{})
- type ByteArrayCall
- type Cache
- type DataResult
- type LRU
- type LRUImpl
- type Map
- type MapCall
- type MapSlice
- type MapSliceCall
- type StringCall
- type Value
Constants ¶
View Source
const ( TypeString = iota + 1 TypeByteArray TypeMap TypeMapSlice )
View Source
const KB = 1 << 10
View Source
const MB = 1 << 20
Variables ¶
View Source
var LRUCache = NewLRUCache(10 * MB)
View Source
var Uninitialized = errors.New("缓存未初始化")
缓存未初始化
Functions ¶
func CheckError ¶
func CheckError(err error)
Types ¶
type ByteArrayCall ¶
type ByteArrayCall func() []byte
type DataResult ¶
type LRU ¶
type MapSliceCall ¶ added in v0.1.6
type MapSliceCall func() MapSlice
type StringCall ¶
type StringCall func() string
Click to show internal directories.
Click to hide internal directories.