Versions in this module Expand all Collapse all v1 v1.1.0 Aug 4, 2020 Changes in this version + const CacheType + const ChainType + const LoadableType + const MetricType + type Cache struct + func New(store store.StoreInterface) *Cache + func (c *Cache) Clear() error + func (c *Cache) Delete(key interface{}) error + func (c *Cache) Get(key interface{}) (interface{}, error) + func (c *Cache) GetCodec() codec.CodecInterface + func (c *Cache) GetType() string + func (c *Cache) Invalidate(options store.InvalidateOptions) error + func (c *Cache) Set(key, object interface{}, options *store.Options) error + type CacheInterface interface + Clear func() error + Delete func(key interface{}) error + Get func(key interface{}) (interface{}, error) + GetType func() string + Invalidate func(options store.InvalidateOptions) error + Set func(key, object interface{}, options *store.Options) error + type ChainCache struct + func NewChain(caches ...SetterCacheInterface) *ChainCache + func (c *ChainCache) Clear() error + func (c *ChainCache) Delete(key interface{}) error + func (c *ChainCache) Get(key interface{}) (interface{}, error) + func (c *ChainCache) GetCaches() []SetterCacheInterface + func (c *ChainCache) GetType() string + func (c *ChainCache) Invalidate(options store.InvalidateOptions) error + func (c *ChainCache) Set(key, object interface{}, options *store.Options) error + type LoadableCache struct + func NewLoadable(loadFunc loadFunction, cache CacheInterface) *LoadableCache + func (c *LoadableCache) Clear() error + func (c *LoadableCache) Delete(key interface{}) error + func (c *LoadableCache) Get(key interface{}) (interface{}, error) + func (c *LoadableCache) GetType() string + func (c *LoadableCache) Invalidate(options store.InvalidateOptions) error + func (c *LoadableCache) Set(key, object interface{}, options *store.Options) error + type MetricCache struct + func NewMetric(metrics metrics.MetricsInterface, cache CacheInterface) *MetricCache + func (c *MetricCache) Clear() error + func (c *MetricCache) Delete(key interface{}) error + func (c *MetricCache) Get(key interface{}) (interface{}, error) + func (c *MetricCache) GetType() string + func (c *MetricCache) Invalidate(options store.InvalidateOptions) error + func (c *MetricCache) Set(key, object interface{}, options *store.Options) error + type SetterCacheInterface interface + GetCodec func() codec.CodecInterface