Documentation ¶
Index ¶
- type Cache
- func (cache *Cache) AddToSlice(key string, data interface{})
- func (cache *Cache) Count() int
- func (cache *Cache) Delete(key string)
- func (cache *Cache) Dump()
- func (cache *Cache) Get(key string) (data interface{}, found bool)
- func (cache *Cache) GetSimple(key string) (data interface{}, found bool)
- func (cache *Cache) Set(key string, data interface{})
- type Item
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a synchronised map of items that auto-expire once stale
func (*Cache) AddToSlice ¶
AddToSlice implements a super dirty slice cache method
func (*Cache) Count ¶
Count returns the number of items in the cache (helpful for tracking memory leaks)
func (*Cache) Get ¶
Get is a thread-safe way to lookup items Every lookup, also touches the item, hence extending it's life
Click to show internal directories.
Click to hide internal directories.