Versions in this module Expand all Collapse all v0 v0.2.2 Nov 12, 2025 Changes in this version + func DecodeGob(data []byte, out *Item) error + func Decr(val interface{}) (interface{}, error) + func EncodeGob(item *Item) ([]byte, error) + func GenericPing(c Cache) error + func Incr(val interface{}) (interface{}, error) + func Register(name string, adapter Cache) + type Cache interface + Decr func(key string) error + Delete func(key string) error + Flush func() error + Get func(key string) interface{} + Incr func(key string) error + IsExist func(key string) bool + Ping func() error + Put func(key string, val interface{}, timeout int64) error + StartAndGC func(opt Options) error + func NewCacher(opt Options) (Cache, error) + type FileCacher struct + func NewFileCacher() *FileCacher + func (c *FileCacher) Decr(key string) error + func (c *FileCacher) Delete(key string) error + func (c *FileCacher) Flush() error + func (c *FileCacher) Get(key string) interface{} + func (c *FileCacher) Incr(key string) error + func (c *FileCacher) IsExist(key string) bool + func (c *FileCacher) Ping() error + func (c *FileCacher) Put(key string, val interface{}, expire int64) error + func (c *FileCacher) StartAndGC(opt Options) error + type Item struct + Created int64 + Expire int64 + Val interface{} + type MemoryCacher struct + func NewMemoryCacher() *MemoryCacher + func (c *MemoryCacher) Decr(key string) (err error) + func (c *MemoryCacher) Delete(key string) error + func (c *MemoryCacher) Flush() error + func (c *MemoryCacher) Get(key string) interface{} + func (c *MemoryCacher) Incr(key string) (err error) + func (c *MemoryCacher) IsExist(key string) bool + func (c *MemoryCacher) Ping() error + func (c *MemoryCacher) Put(key string, val interface{}, expire int64) error + func (c *MemoryCacher) StartAndGC(opt Options) error + type MemoryItem struct + type Options struct + Adapter string + AdapterConfig string + Interval int + OccupyMode bool + Section string