Documentation ¶
Index ¶
- func NewMemoryCache(prefix string) 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, ttl 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) cache.Store
- type ServiceProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMemoryCache ¶
Types ¶
type Application ¶
func (*Application) Init ¶
func (app *Application) Init() cache.Store
type Memory ¶
type Memory struct { Prefix string Client contractStorage.Storage }
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.
type ServiceProvider ¶
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.