Documentation ¶
Index ¶
- func NewApplication() cache.Store
- type Application
- type Memory
- func (r *Memory) Add(key string, value any, seconds time.Duration) bool
- 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) GetString(key string, def string) string
- func (r *Memory) Has(key string) bool
- func (r *Memory) Pull(key string, def any) any
- func (r *Memory) Put(key string, value any, seconds 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) cachecontract.Store
- type Redis
- func (r *Redis) Add(key string, value any, seconds time.Duration) bool
- func (r *Redis) Flush() bool
- func (r *Redis) Forever(key string, value any) bool
- func (r *Redis) Forget(key string) bool
- func (r *Redis) Get(key string, def any) any
- func (r *Redis) GetBool(key string, def bool) bool
- func (r *Redis) GetInt(key string, def int) int
- func (r *Redis) GetString(key string, def string) string
- func (r *Redis) Has(key string) bool
- func (r *Redis) Pull(key string, def any) any
- func (r *Redis) Put(key string, value any, seconds time.Duration) error
- func (r *Redis) Remember(key string, seconds time.Duration, callback func() any) (any, error)
- func (r *Redis) RememberForever(key string, callback func() any) (any, error)
- func (r *Redis) WithContext(ctx context.Context) cache.Store
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApplication ¶
func (app *Application) Init() cache.Store {
Types ¶
type Application ¶
type Application struct { }
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) Remember ¶
Remember Get an item from the cache, or execute the given Closure and store the result.
func (*Memory) RememberForever ¶
RememberForever Get an item from the cache, or execute the given Closure and store the result forever.
func (*Memory) WithContext ¶
func (r *Memory) WithContext(ctx context.Context) cachecontract.Store
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
func (*Redis) Remember ¶
Remember Get an item from the cache, or execute the given Closure and store the result.
func (*Redis) RememberForever ¶
RememberForever Get an item from the cache, or execute the given Closure and store the result forever.
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.