Documentation ¶
Overview ¶
Package cache provides a simple caching mechanism that limits the age of cache entries and tries to avoid large repopulation events by staggering refresh times.
Index ¶
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
}
Cache holds a time-limited set of values for arbitrary keys.
func New ¶
New returns a new Cache that will cache items for at most maxAge. If maxAge is zero, items will never be cached.
Click to show internal directories.
Click to hide internal directories.