Documentation ¶
Index ¶
- Variables
- type CacheManager
- func (cm *CacheManager) Del(keyPattern string) error
- func (cm *CacheManager) Get(dst []byte, key string) []byte
- func (cm *CacheManager) GetWithErr(key string) ([]byte, error)
- func (cm *CacheManager) Has(key string) bool
- func (cm *CacheManager) ListKeys() []string
- func (cm *CacheManager) Reset()
- func (cm *CacheManager) Set(key string, value []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CacheManager ¶
type CacheManager struct { MaxLength int // contains filtered or unexported fields }
CacheManager manage fastcache. This extends the github.com/VictoriaMetrics/fastcache to have a Del that supports wildcards
func (*CacheManager) Del ¶
func (cm *CacheManager) Del(keyPattern string) error
Del deletes an item or items with the pattern in the cache
func (*CacheManager) Get ¶
func (cm *CacheManager) Get(dst []byte, key string) []byte
Get the cache content
func (*CacheManager) GetWithErr ¶
func (cm *CacheManager) GetWithErr(key string) ([]byte, error)
GetWithErr get the cache content with error
func (*CacheManager) Has ¶
func (cm *CacheManager) Has(key string) bool
Has checks if a cache item is present in the cache
func (*CacheManager) ListKeys ¶
func (cm *CacheManager) ListKeys() []string
ListKeys gets the list of keys
Click to show internal directories.
Click to hide internal directories.