Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache is a synchronised map of items that auto-expire once stale
func (*Cache) Close ¶
func (c *Cache) Close()
Close remove all data from Cache and exit cleanup. Cache cannot use any more after close
type CacheOption ¶
type CacheOption func(*Cache)
func CacheWithLRU ¶
func CacheWithLRU(cap int) CacheOption
func CacheWithTTL ¶
func CacheWithTTL(d time.Duration) CacheOption
type Counter ¶
func NewCounter ¶
NewCounter create a counter with TTL records
Click to show internal directories.
Click to hide internal directories.