Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Clear()
- func (c *Cache) ClearEvery(d time.Duration) *time.Ticker
- func (c *Cache) Delete(key string)
- func (c *Cache) Get(key string) T
- func (c *Cache) GetOK(key string) (T, bool)
- func (c *Cache) Items() map[string]T
- func (c *Cache) Keys() []string
- func (c *Cache) Set(key string, val T, options ...SetOption)
- type SetOption
- type T
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
}
A Cache is a thread-safe store for fast item storage and retrieval
func (*Cache) ClearEvery ¶
ClearEvery clears the cache on a loop at the specified interval
func (*Cache) Delete ¶
Delete removes an entry from the cache at the specified key. If no entry exists at the specified key, no action is taken
func (*Cache) GetOK ¶
GetOK retrieves an entry at the specified key. Returns bool specifying if the entry exists
Click to show internal directories.
Click to hide internal directories.