Documentation ¶
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
}
A Cache is a map that retains a limited number of items. It must be initialized with New, providing a maximum capacity for the cache. Only the most recently used items are retained.
func (*Cache) ConsistencyCheck ¶
ConsistencyCheck runs a series of checks to ensure that the cache's data structures are consistent. It is not normally required, and it is primarily used in testing.
func (*Cache) Get ¶
Get returns the value stored in the cache. If the item isn't present, it will return false.
func (*Cache) Has ¶
Has returns true if the cache has an entry for k. It will not update the timestamp on the item.
Click to show internal directories.
Click to hide internal directories.