Documentation
¶
Index ¶
- type Cache
- func (c *Cache) Copy(key string, newKey string) error
- func (c *Cache) Delete(key string) error
- func (c *Cache) Exists(key string) bool
- func (c *Cache) FlushAll() error
- func (c *Cache) GC()
- func (c *Cache) Get(key string) (interface{}, bool)
- func (c *Cache) GetCount() int
- func (c *Cache) GetItem(key string) (*Item, bool)
- func (c *Cache) GetLikeKey(search string) ([]interface{}, bool)
- func (c *Cache) Rename(key string, newKey string) error
- func (c *Cache) Set(key string, value interface{}, duration time.Duration) error
- func (c *Cache) StartGC() error
- type Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache struct cache
func (*Cache) Copy ¶
Copy copying a value from key to a newkey Return error if key eq newkey Return error if key is empty Return error if newkey is exist
func (*Cache) GetItem ¶
GetItem getting item cache Second parameter returns false if cache not found or expired
func (*Cache) GetLikeKey ¶
GetLikeKey list of keys by mask findString% - start of string %findString - end of string %findString% - any occurrence of a string findString - full occurrence of a string
func (*Cache) Rename ¶
Rename rename key to newkey When renaming, the value with the key is deleted Return false in key eq newkey Return false if newkey is exist
Click to show internal directories.
Click to hide internal directories.