Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Cache is a cache of elements.
func (*Cache[V]) MarkAsStale ¶ added in v0.2.8
MarkAsStale marks the element with given key as stale. The next call to Get will force the element to be (re)created rather than using any cached copy.
type CreationFunc ¶
CreationFunc creates a new value for the given key.
type Element ¶
Element is an entry in the cache.
func (*Element[V]) Key ¶
Key returns the key for this element. This can be safely called after a call to Release.
Click to show internal directories.
Click to hide internal directories.