Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Favorites ¶
type Favorites[T any] struct { // contains filtered or unexported fields }
Favorites implements a generic key value storage, with a maximum number of entries. It keeps track of reads to favor keys with more reads when the cache has reached the maximum of entries. It is save for concurrent usage.
func NewFavoritesCache ¶
NewFavoritesCache returns a newly initialized favorites cache with a given maximum number of entries.
Click to show internal directories.
Click to hide internal directories.