Versions in this module Expand all Collapse all v0 v0.9.1 Dec 2, 2020 Changes in this version + type Cache struct + func NewCache() *Cache + func (c *Cache) Delete(key interface{}) error + func (c *Cache) Get(key interface{}) (interface{}, error) + func (c *Cache) Put(key interface{}, value interface{}) error + type LRUCache struct + func NewLRUCache(size int) (*LRUCache, error) + func (c *LRUCache) Delete(key interface{}) error + func (c *LRUCache) Get(key interface{}) (interface{}, error) + func (c *LRUCache) Put(key interface{}, value interface{}) error + type TTLCache struct + func NewTTLCache(ctx context.Context, ttl time.Duration, evictionInterval time.Duration) *TTLCache + func (c *TTLCache) Delete(key interface{}) error + func (c *TTLCache) Get(key interface{}) (interface{}, error) + func (c *TTLCache) Put(key interface{}, value interface{}) error