Documentation ¶
Index ¶
- Constants
- Variables
- func Init(conf []Config) error
- type Config
- type LRU
- type LRUImpl
- func (lru *LRUImpl) Capacity() uint64
- func (lru *LRUImpl) Delete(key string) bool
- func (lru *LRUImpl) Exists(key string) bool
- func (lru *LRUImpl) Flush()
- func (lru *LRUImpl) Get(key string) (v Value, ok bool)
- func (lru *LRUImpl) Set(key string, val []byte, expiration int32) error
- func (lru *LRUImpl) Size() uint64
- type Manager
- type Value
Constants ¶
View Source
const KB = 1 << 10
View Source
const MB = 1 << 20
Variables ¶
View Source
var ( ErrLRUCacheNotExists = errors.New("指定LRUCache不存在,或未初始化") ErrSizeOverflow = errors.New("LRU容量溢出") )
Functions ¶
Types ¶
type LRU ¶
Click to show internal directories.
Click to hide internal directories.