Versions in this module Expand all Collapse all v1 v1.0.0 Jun 22, 2023 Changes in this version + const Binding + const NoExpiration + type Application struct + func NewApplication(config config.Config, log log.Log, store string) (*Application, error) + func (app *Application) Store(name string) cache.Driver + type Driver interface + New func(store string) (cache.Driver, error) + type DriverImpl struct + func NewDriverImpl(config config.Config) *DriverImpl + func (d *DriverImpl) New(store string) (cache.Driver, error) + type Lock struct + func NewLock(instance contractscache.Driver, key string, t ...time.Duration) *Lock + func (r *Lock) Block(t time.Duration, callback ...func()) bool + func (r *Lock) ForceRelease() bool + func (r *Lock) Get(callback ...func()) bool + func (r *Lock) Release() bool + type Memory struct + func NewMemory(config config.Config) (*Memory, error) + func (r *Memory) Add(key string, value any, t time.Duration) bool + func (r *Memory) Decrement(key string, value ...int) (int, error) + func (r *Memory) Flush() bool + func (r *Memory) Forever(key string, value any) bool + func (r *Memory) Forget(key string) bool + func (r *Memory) Get(key string, def ...any) any + func (r *Memory) GetBool(key string, def ...bool) bool + func (r *Memory) GetInt(key string, def ...int) int + func (r *Memory) GetInt64(key string, def ...int64) int64 + func (r *Memory) GetString(key string, def ...string) string + func (r *Memory) Has(key string) bool + func (r *Memory) Increment(key string, value ...int) (int, error) + func (r *Memory) Lock(key string, t ...time.Duration) contractscache.Lock + func (r *Memory) Pull(key string, def ...any) any + func (r *Memory) Put(key string, value any, t time.Duration) error + func (r *Memory) Remember(key string, seconds time.Duration, callback func() any) (any, error) + func (r *Memory) RememberForever(key string, callback func() any) (any, error) + func (r *Memory) WithContext(ctx context.Context) contractscache.Driver + type ServiceProvider struct + func (database *ServiceProvider) Boot(app foundation.Application) + func (database *ServiceProvider) Register(app foundation.Application)