Documentation
¶
Index ¶
- Variables
- type LocalCache
- func (c *LocalCache) Close()
- func (c *LocalCache) Del(key string) error
- func (c *LocalCache) Get(key string, result interface{}) error
- func (c *LocalCache) GetValue(key string) (value any, err error)
- func (c *LocalCache) IsExists(key string) bool
- func (c *LocalCache) Set(key string, data interface{}, expire time.Duration) error
- func (c *LocalCache) TTL(key string) (expire int64, err error)
- type LocalCacheIer
- type Value
Constants ¶
This section is empty.
Variables ¶
View Source
var Local = NewLocalCache()
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func (*LocalCache) Close ¶
func (c *LocalCache) Close()
func (*LocalCache) Del ¶
func (c *LocalCache) Del(key string) error
func (*LocalCache) Get ¶
func (c *LocalCache) Get(key string, result interface{}) error
Get get cache data
func (*LocalCache) GetValue ¶
func (c *LocalCache) GetValue(key string) (value any, err error)
GetValue get cache data
func (*LocalCache) IsExists ¶
func (c *LocalCache) IsExists(key string) bool
type LocalCacheIer ¶
type LocalCacheIer interface {
IsExists(key string) bool
Set(key string, data interface{}, expire time.Duration) error
Get(key string, result interface{}) error
Del(key string) error
Close()
}
LocalCacheIer local cache interface
func NewLocalCache ¶
func NewLocalCache() LocalCacheIer
Click to show internal directories.
Click to hide internal directories.