Versions in this module Expand all Collapse all v1 v1.0.2 Oct 30, 2025 v1.0.1 May 26, 2022 Changes in this version + func DefaultKey(s string) string + func NewCache(col *mgo.Collection, f func(string) string) cache.Cache + type Cache struct + func (p *Cache) ClearAll() (err error) + func (p *Cache) Close() error + func (p *Cache) Delete(key string) + func (p *Cache) Get(key string) ([]byte, bool) + func (p *Cache) GetRange(key string, low, high int64) (b []byte, ok bool) + func (p *Cache) Set(key string, value []byte) + func (p *Cache) SetTimeout(key string, value []byte, timeout time.Duration) error + type MgoCache struct + func New(db *mgo.Database, name string, f func(string) string) *MgoCache + func (p *MgoCache) ClearAll() (err error) + func (p *MgoCache) Close() error + func (p *MgoCache) Delete(key string) + func (p *MgoCache) Get(key string) ([]byte, bool) + func (p *MgoCache) GetRange(key string, low, high int64) (b []byte, ok bool) + func (p *MgoCache) Set(key string, value []byte) + func (p *MgoCache) SetTimeout(key string, value []byte, timeout time.Duration)