Versions in this module Expand all Collapse all v0 v0.19.0 Mar 28, 2020 Changes in this version + type Cache struct + func New(interval time.Duration) *Cache + func (c Cache) Get(key interface{}) interface{} + func (c Cache) GetWithExpire(key interface{}) (payload interface{}, expired time.Time) + func (c Cache) Put(key interface{}, payload interface{}, ttl time.Duration) + type EvictCallback = func(key interface{}, value interface{}) + type LruCache struct + func NewLRUCache(options ...Option) *LruCache + func (c *LruCache) Delete(key string) + func (c *LruCache) Exist(key interface{}) bool + func (c *LruCache) Get(key interface{}) (interface{}, bool) + func (c *LruCache) Set(key interface{}, value interface{}) + type Option func(*LruCache) + func WithAge(maxAge int64) Option + func WithEvict(cb EvictCallback) Option + func WithSize(maxSize int) Option + func WithUpdateAgeOnGet() Option