Documentation
¶
Index ¶
- func Decrease(key string, step int64) error
- func Delete(key string) error
- func Expire(key string, dur time.Duration) error
- func Get(key string) (any, error)
- func Increase(key string, step int64) error
- func Set(key string, value any, ttl time.Duration) error
- func SetDefault(c contract.CacheHandlerInterface)
- type CacheAdapter
- func (t *CacheAdapter) Decrease(key string, step int64) error
- func (t *CacheAdapter) Delete(name string) error
- func (t *CacheAdapter) Expire(key string, dur time.Duration) error
- func (t *CacheAdapter) Get(name string) (any, error)
- func (t *CacheAdapter) Increase(key string, step int64) error
- func (t *CacheAdapter) Set(name string, value any, dur time.Duration) error
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefault ¶
func SetDefault(c contract.CacheHandlerInterface)
Types ¶
type CacheAdapter ¶
type CacheAdapter struct {
// contains filtered or unexported fields
}
func Default ¶
func Default() *CacheAdapter
func NewCache ¶
func NewCache(handler contract.CacheHandlerInterface, opts ...OptionFunc) *CacheAdapter
func (*CacheAdapter) Delete ¶
func (t *CacheAdapter) Delete(name string) error
type OptionFunc ¶
type OptionFunc func(*CacheAdapter)
func WithPrefix ¶
func WithPrefix(prefix string) OptionFunc
Click to show internal directories.
Click to hide internal directories.