Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TTLMap ¶
type TTLMap struct {
// contains filtered or unexported fields
}
TTLMap is a map that evicts entries after the configured ttl has elapsed.
func New ¶
New creates a TTLMap. The sweepIntervalSeconds arg indicates how often entries are checked for expiration. The maxAgeSeconds arg indicates how long entries can persist before getting evicted. Call Start() on the returned TTLMap to begin periodic sweeps which check for expiration and evict entries as needed.
func (*TTLMap) Get ¶
Get returns the object in the underlying map at the given key. If there is no value at that key, Get returns nil.
Click to show internal directories.
Click to hide internal directories.