Documentation ¶
Index ¶
- func Add(key string, value any, sec time.Duration) bool
- func ClearPrefix(delPrefix string) error
- func Flush() bool
- func Forever(key string, value any) bool
- func Forget(key string) bool
- func Get(key string, def any) any
- func GetBool(key string, def bool) bool
- func GetInt(key string, def int) int
- func GetString(key string, def string) string
- func Has(key string) bool
- func Pull(key string, def any) any
- func Put(key string, value any, sec time.Duration) error
- func Remember(key string, ttl time.Duration, callback func() any) (any, error)
- func RememberForever(key string, callback func() any) (any, error)
- func Store(storeName string) cache.IStore
- func WithContext(ctx context.Context) cache.IStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Remember ¶
Remember Get an item from the cache, or execute the given Closure and store the result.
func RememberForever ¶
RememberForever Get an item from the cache, or execute the given Closure and store the result forever.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.