Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBytes ¶
func NewBytes(cacheSize int) *secondChanceCacheBytes
NewBytes returns a cache holding at most cacheSize entries, keyed by a byte slice. cacheSize must be at least 1, as in NewTyped.
func NewTyped ¶
NewTyped returns a cache holding at most cacheSize entries, which must be at least 1: the victim scan evicts into a fixed set of slots, so a smaller size leaves it nothing to index. Callers validate the size they pass, either against configuration (kvs.CacheSizeFromConfig) or by skipping the cache entirely (vault.NewCachedVault).
Types ¶
Click to show internal directories.
Click to hide internal directories.