Versions in this module Expand all Collapse all v1 v1.10.2 Jun 26, 2023 Changes in this version + type Cache struct + func NewCache(t mockConstructorTestingTNewCache) *Cache + func (_m *Cache) Add(key string, value interface{}, t time.Duration) bool + func (_m *Cache) Decrement(key string, value ...int) (int, error) + func (_m *Cache) Flush() bool + func (_m *Cache) Forever(key string, value interface{}) bool + func (_m *Cache) Forget(key string) bool + func (_m *Cache) Get(key string, def ...interface{}) interface{} + func (_m *Cache) GetBool(key string, def ...bool) bool + func (_m *Cache) GetInt(key string, def ...int) int + func (_m *Cache) GetInt64(key string, def ...int64) int64 + func (_m *Cache) GetString(key string, def ...string) string + func (_m *Cache) Has(key string) bool + func (_m *Cache) Increment(key string, value ...int) (int, error) + func (_m *Cache) Lock(key string, t ...time.Duration) cache.Lock + func (_m *Cache) Pull(key string, def ...interface{}) interface{} + func (_m *Cache) Put(key string, value interface{}, t time.Duration) error + func (_m *Cache) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error) + func (_m *Cache) RememberForever(key string, callback func() interface{}) (interface{}, error) + func (_m *Cache) Store(name string) cache.Driver + func (_m *Cache) WithContext(ctx context.Context) cache.Driver + type Driver struct + func NewDriver(t mockConstructorTestingTNewDriver) *Driver + func (_m *Driver) Add(key string, value interface{}, t time.Duration) bool + func (_m *Driver) Decrement(key string, value ...int) (int, error) + func (_m *Driver) Flush() bool + func (_m *Driver) Forever(key string, value interface{}) bool + func (_m *Driver) Forget(key string) bool + func (_m *Driver) Get(key string, def ...interface{}) interface{} + func (_m *Driver) GetBool(key string, def ...bool) bool + func (_m *Driver) GetInt(key string, def ...int) int + func (_m *Driver) GetInt64(key string, def ...int64) int64 + func (_m *Driver) GetString(key string, def ...string) string + func (_m *Driver) Has(key string) bool + func (_m *Driver) Increment(key string, value ...int) (int, error) + func (_m *Driver) Lock(key string, t ...time.Duration) cache.Lock + func (_m *Driver) Pull(key string, def ...interface{}) interface{} + func (_m *Driver) Put(key string, value interface{}, t time.Duration) error + func (_m *Driver) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error) + func (_m *Driver) RememberForever(key string, callback func() interface{}) (interface{}, error) + func (_m *Driver) WithContext(ctx context.Context) cache.Driver + type Lock struct + func NewLock(t mockConstructorTestingTNewLock) *Lock + func (_m *Lock) Block(t time.Duration, callback ...func()) bool + func (_m *Lock) ForceRelease() bool + func (_m *Lock) Get(callback ...func()) bool + func (_m *Lock) Release() bool v1.10.1 Mar 31, 2023 Changes in this version + type Store struct + func NewStore(t mockConstructorTestingTNewStore) *Store + func (_m *Store) Add(key string, value interface{}, sec time.Duration) bool + func (_m *Store) Flush() bool + func (_m *Store) Forever(key string, value interface{}) bool + func (_m *Store) Forget(key string) bool + func (_m *Store) Get(key string, def interface{}) interface{} + func (_m *Store) GetBool(key string, def bool) bool + func (_m *Store) GetInt(key string, def int) int + func (_m *Store) GetString(key string, def string) string + func (_m *Store) Has(key string) bool + func (_m *Store) Pull(key string, def interface{}) interface{} + func (_m *Store) Put(key string, value interface{}, sec time.Duration) error + func (_m *Store) Remember(key string, ttl time.Duration, callback func() interface{}) (interface{}, error) + func (_m *Store) RememberForever(key string, callback func() interface{}) (interface{}, error) + func (_m *Store) WithContext(ctx context.Context) cache.Store