Documentation
¶
Index ¶
- type CacheEntry
- type CachedMap
- func (c *CachedMap) Get(key string) (interface{}, bool)
- func (c *CachedMap) GetStats() Stats
- func (c *CachedMap) Len() int
- func (c *CachedMap) Set(key string, data interface{}) time.Time
- func (c *CachedMap) SetLog(log *logrus.Entry)
- func (c *CachedMap) SetUntil(key string, data interface{}, removeTime time.Time)
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheEntry ¶
type CachedMap ¶
type CachedMap struct { Name string Hits int64 Misses int64 Writes int64 Flushes int64 MaxLength int // contains filtered or unexported fields }
func NewCachedMap ¶
func (*CachedMap) Get ¶
Get returns a non-expired entry and true. If no valid entry is found, it returns (nil, false).
func (*CachedMap) Set ¶
Set adds an item to the map with a computed remove time. It returns the remove time in case you want to use it in a nearby SetUntil() call.
Click to show internal directories.
Click to hide internal directories.