Documentation
¶
Index ¶
- Variables
- type Cache
- func (c *Cache) Delete(key string) error
- func (c *Cache) DeleteAllByTag(tagName string) error
- func (c *Cache) Get(key string) ([]byte, error)
- func (c *Cache) GetAllByTag(tag string) ([][]byte, error)
- func (c *Cache) Set(key string, value []byte) error
- func (c *Cache) SetWithTags(key string, value []byte, tags ...string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("item not found")
)
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) DeleteAllByTag ¶ added in v0.27.0
DeleteAllByTag deletes all items in the cache that have been tagged by tagName. Deletes an item even if multiple tags refer to it.
func (*Cache) Get ¶ added in v0.27.0
Get returns the item identified by key from the cache. It returns ErrNotFound if the item doesn't exist in the cache.
func (*Cache) GetAllByTag ¶ added in v0.27.0
GetAllByTag returns the values of all items tagged with tag.
Click to show internal directories.
Click to hide internal directories.