package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

NewIntervalCache creates a new Cache backed by an interval tree.
NewOrderedCache creates a new Cache backed by a left-leaning red black binary tree which supports binary searches via the Ceil() and Floor() methods.
NewUnorderedCache creates a new UnorderedCache backed by a hash map.

# Constants

First in, first out.
Least recently used.
No evictions; don't maintain ordering list.

# Structs

A Config specifies the eviction policy, eviction trigger callback, and eviction listener callback.
Entry
Entry holds the key and value and a pointer to the linked list which defines the eviction ordering.
IntervalCache is a cache which supports querying of intervals which match a key or range of keys.
IntervalKey provides uniqueness as well as key interval.
OrderedCache is a cache which supports binary searches using Ceil and Floor methods.
UnorderedCache is a cache which supports custom eviction triggers and two eviction policies: LRU and FIFO.

# Type aliases

EvictionPolicy is the cache eviction policy enum.
IntervalCacheLogErrorf is a hook that is called on certain errors in the IntervalCache.