Versions in this module Expand all Collapse all v0 v0.1.1 Feb 12, 2019 v0.1.0 Nov 22, 2018 Changes in this version + const AllKeysRandomMode + const NoEvictionMode + const SaveAllKeysMode + const SaveExpireKeysMode + const SaveNoExpireKeysMode + const VolatileRandomMode + type Cache struct + func NewCache(cfg Config) (*Cache, error) + func (c *Cache) Add(key interface{}, value interface{}, expire time.Duration) error + func (c *Cache) Close() error + func (c *Cache) Delete(key interface{}) + func (c *Cache) Flush() + func (c *Cache) Get(key interface{}) (value interface{}, ok bool) + func (c *Cache) GetWithExpire(key interface{}) (interface{}, time.Duration, bool) + func (c *Cache) LoadDisk(filename string) error + func (c *Cache) Range(f func(key, value interface{}) bool) + func (c *Cache) SaveDisk(filename string, mode saveMode) error + func (c *Cache) Set(key interface{}, value interface{}) error + func (c *Cache) SetExpire(key interface{}, value interface{}, expire time.Duration) error + func (c *Cache) Size() int64 + type Config struct + AutoSave bool + CleanInterval time.Duration + Filename string + MaxSize int64 + OverSizeClearMode cleanMode + SaveType saveMode