Versions in this module Expand all Collapse all v0 v0.7.1 Jan 11, 2022 v0.7.0 Nov 21, 2021 Changes in this version type Cache + func (c *Cache) UpdateExpirationDate(key interface{}, exp time.Duration) (Item, error) + func (c *Cache) UpdateVal(key interface{}, val interface{}) (Item, error) type Item + func (i Item) Expired() bool v0.6.0 Nov 19, 2021 Changes in this version type Cache + func (c *Cache) ClearExpiredData() + func (c *Cache) Replace(key interface{}, val interface{}) error v0.5.0 Nov 17, 2021 v0.4.0 Nov 17, 2021 v0.3.0 Nov 17, 2021 Changes in this version type Cache + func (c *Cache) RemoveOldest() (k string, v interface{}, ok bool) + func (c *Cache) Resize(size int) int v0.2.0 Nov 16, 2021 Changes in this version type Cache + func (c *Cache) Peek(key string) (interface{}, bool) v0.1.0 Nov 16, 2021 Changes in this version + type Cache struct + Cap int + CleanInterval time.Duration + ExpirationTimeoutInterval time.Duration + Len int + func New(cap int, config Config) (*Cache, error) + func (c *Cache) Add(key string, val interface{}, exp time.Duration) error + func (c *Cache) Clear() + func (c *Cache) Contains(key string) bool + func (c *Cache) Get(key string) (interface{}, bool) + func (c *Cache) Keys() []string + func (c *Cache) Remove(key string) error + type Config struct + CleanInterval time.Duration + ExpirationTimeoutInterval time.Duration + type Item struct + Expiration time.Duration + Key string + Val interface{}