Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher[K comparable, V any] interface { // Put inserts an element into the cache. If space is required, elements will // be evicted. Put(key K, value V) // Get returns the entry in the cache with the key specified, if no value // exists, false is returned. Get(key K) (V, bool) // Evict removes the specified entry from the cache Evict(key K) // Flush removes all entries from the cache Flush() // Returns the number of elements currently in the cache Len() int // Returns fraction of cache currently filled (0 --> 1) PortionFilled() float64 }
Cacher acts as a best effort key value store.
type Empty ¶ added in v1.10.4
Empty is a cache that doesn't store anything.
func (*Empty[_, _]) PortionFilled ¶ added in v1.10.4
Click to show internal directories.
Click to hide internal directories.