Documentation ¶
Overview ¶
Package gocache 并发安全、支持lru、支持过期的缓存轮子
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound key不存在错误 ErrKeyNotFound = fmt.Errorf("key not found") // ErrKeyIsExpired key过期错误 ErrKeyIsExpired = fmt.Errorf("key is expired") )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache 缓存核心结构
type CacheOpt ¶
type CacheOpt struct {
// contains filtered or unexported fields
}
CacheOpt Cache参数选项结构
type UpdateCallback ¶ added in v0.0.2
type UpdateCallback func() (interface{}, error)
UpdateCallback 更新数据回调
Click to show internal directories.
Click to hide internal directories.