Versions in this module Expand all Collapse all v1 v1.0.0 Sep 22, 2020 Changes in this version + func MakeKey(keys ...string) string + func NewInMemoryCache(opts *CacheOpts) *inMemoryCache + func NewShardedClusterRedisCache(opts *CacheOpts, watcher ITimer) *redisCache + func NewTinyCache(opts *CacheOpts) *tinyCache + type CacheOpts struct + type DummyCounter struct + func NewDummyCounter() *DummyCounter + func (*DummyCounter) Inc(...string) + type DummyTimer struct + func NewDummyTimer() *DummyTimer + func (*DummyTimer) Done(a time.Time, b ...string) + func (*DummyTimer) Start() time.Time + type ErrCacheMiss struct + func (e *ErrCacheMiss) Error() string + type ICache interface + Clear func() error + Delete func(context.Context, string) error + Get func(context.Context, string) (*cachableRet, error) + Name func() string + Set func(context.Context, string, interface{}) error + TTL func(context.Context, string) time.Duration + func NewCacheLayer(opts *CacheOpts, watcher ITimer) ICache + type ICounter interface + Inc func(...string) + type ITimer interface + Done func(time.Time, ...string) + Start func() time.Time + type MemoryOpts struct + type Mnemosyne struct + func NewMnemosyne(config *viper.Viper, commTimer ITimer, cacheHitCounter ICounter) *Mnemosyne + func (m *Mnemosyne) Select(cacheName string) *MnemosyneInstance + type MnemosyneInstance struct + func (mn *MnemosyneInstance) Delete(ctx context.Context, key string) error + func (mn *MnemosyneInstance) Flush(targetLayerName string) error + func (mn *MnemosyneInstance) Get(ctx context.Context, key string, ref interface{}) error + func (mn *MnemosyneInstance) GetAndShouldUpdate(ctx context.Context, key string, ref interface{}) (bool, error) + func (mn *MnemosyneInstance) Set(ctx context.Context, key string, value interface{}) error + func (mn *MnemosyneInstance) ShouldUpdate(ctx context.Context, key string) (bool, error) + func (mn *MnemosyneInstance) TTL(ctx context.Context, key string) (int, time.Duration) + type RedisClusterAddress struct + MasterAddr string + SlaveAddrs []string + type RedisOpts struct