Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[T any] struct { // contains filtered or unexported fields }
Cache is a thread-safe generic struct that you can use to cache values for the current cycle. On a new cycle, determined by cycle metadata, the callback function is called and a new value is initialized. If the callback fails and an old value exists, it is re-used.
Click to show internal directories.
Click to hide internal directories.