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 ¶ added in v1.0.12
Types ¶
type Application ¶
func (*Application) Init ¶
func (app *Application) Init() cache.Store
type Memory ¶ added in v1.0.12
type Memory struct { Prefix string Client contractStorage.Storage }
func (*Memory) Remember ¶ added in v1.0.12
Remember Get an item from the cache, or execute the given Closure and store the result.
func (*Memory) RememberForever ¶ added in v1.0.12
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.