package
1.5.0
Repository: https://github.com/m3db/m3.git
Documentation: pkg.go.dev

# Functions

NewLRU returns a new LRU with the provided options.
NewNoop returns a new no-op cache.

# Constants

Defaults for use with the LRU cache.
Defaults for use with the LRU cache.

# Variables

ErrCacheFull is returned if we need to load an entry, but the cache is already full of entries that are loading.
ErrEntryNotFound is returned if a cache entry cannot be found.

# Structs

CachedError is a wrapper that can be used to force an error to be cached.
LRU is a fixed size LRU cache supporting expiration, loading of entries that do not exist, ability to cache negative results (e.g errors from load), and a mechanism for preventing multiple goroutines from entering the loader function simultaneously for the same key, and a mechanism for restricting the amount of total concurrency in the loader function.
LRUOptions are the options to an LRU cache.
An UncachedError can be used to wrap an error that should not be cached, even if the cache is caching errors.

# Interfaces

Cache is an interface for caches.

# Type aliases

A LoaderFunc is a function for loading entries from a cache.
A LoaderWithTTLFunc is a function for loading entries from a cache, also returning an expiration time.