Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶ added in v0.1.6
type Item struct { Object interface{} Age int64 }
Item is an object which is stored in Cache
func (*Item) RefreshAge ¶ added in v0.1.6
func (i *Item) RefreshAge()
type MemoryCache ¶
type MemoryCache struct {
// contains filtered or unexported fields
}
MemoryCache is an implemtation of Cache that will store items in an in-memory map
func NewMemoryCache ¶
func NewMemoryCache() *MemoryCache
NewMemoryCache returns a new Cache that will store items in an in-memory map
func (*MemoryCache) Delete ¶
func (c *MemoryCache) Delete(k string)
Delete removes an item from cache
func (*MemoryCache) Refresh ¶ added in v0.1.6
func (c *MemoryCache) Refresh(k string)
func (*MemoryCache) Set ¶
func (c *MemoryCache) Set(k string, x interface{})
Set stores an item to cache
Click to show internal directories.
Click to hide internal directories.