Documentation
¶
Index ¶
- func New(_ map[string]interface{}) (cache.Cache, error)
- type MemoryCache
- func (p *MemoryCache) ClearAll() (err error)
- func (p *MemoryCache) Close() error
- func (p *MemoryCache) Delete(key string)
- func (p *MemoryCache) Get(key string) (value []byte, ok bool)
- func (p *MemoryCache) GetRange(key string, low, high int64) (value []byte, ok bool)
- func (p *MemoryCache) Set(key string, value []byte)
- func (p *MemoryCache) SetTimeout(key string, value []byte, timeout time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache Cache in in-memory map.
func (*MemoryCache) ClearAll ¶
func (p *MemoryCache) ClearAll() (err error)
ClearAll clear all cache
func (*MemoryCache) Close ¶
func (p *MemoryCache) Close() error
func (*MemoryCache) Delete ¶
func (p *MemoryCache) Delete(key string)
Delete delete cached value by key
func (*MemoryCache) Get ¶
func (p *MemoryCache) Get(key string) (value []byte, ok bool)
Get get cached value by key
func (*MemoryCache) GetRange ¶
func (p *MemoryCache) GetRange(key string, low, high int64) (value []byte, ok bool)
GetRange
func (*MemoryCache) Set ¶
func (p *MemoryCache) Set(key string, value []byte)
func (*MemoryCache) SetTimeout ¶
Put set cached value with key and expire time
Click to show internal directories.
Click to hide internal directories.