Versions in this module Expand all Collapse all v0 v0.1.0 Oct 26, 2024 Changes in this version + type Cache struct + func New() *Cache + func (c *Cache) Clear() + func (c *Cache) Delete(key string) bool + func (c *Cache) DeletePrefix(prefix string) (deleted int) + func (c *Cache) Entries() int + func (c *Cache) EntriesWithPinCount() (pinned, unpinned int) + func (c *Cache) Get(key string, create CreateFunc) (value interface{}, err error) + func (c *Cache) GetMaybe(key string) (value interface{}, found bool) + func (c *Cache) Pin(key string) + func (c *Cache) Put(key string, value interface{}) + func (c *Cache) PutErr(key string, value interface{}, err error) + func (c *Cache) Rename(oldKey, newKey string) (value interface{}, found bool) + func (c *Cache) SetExpireDuration(d time.Duration) *Cache + func (c *Cache) SetExpireInterval(d time.Duration) *Cache + func (c *Cache) SetFinalizer(finalize func(interface{})) + func (c *Cache) Unpin(key string) + type CreateFunc func(key string) (value interface{}, ok bool, error error)