Results for “Std.LruCache.LruCache”
22 matching declarations
Use module:Std.List, kind:fn, or is:exact. Put a Pudu type after ::.
- Std.LruCache.LruCache
A map that holds only so much, and gives up what has gone longest unused.
- Std.LruCache.capacity
&Std.LruCache.LruCache[K, V] -> IntHow many entries the cache will hold before it starts discarding.
- Std.LruCache.cleared
&Std.LruCache.LruCache[K, V] -> Std.LruCache.LruCache[K, V]The cache holding nothing, keeping its capacity.
- Std.LruCache.containsKey
&Std.LruCache.LruCache[K, V] -> K -> BoolWhether a key is held, without marking it as used.
- Std.LruCache.evict
&Std.LruCache.LruCache[K, V] -> Std.LruCache.LruCache[K, V]The cache with its next entry discarded, unchanged when it is empty.
- Std.LruCache.fromPairs
&Array[(K, V)] -> Int -> Std.LruCache.LruCache[K, V]A cache of the given capacity holding these pairs, in the order given.
- Std.LruCache.get
&Std.LruCache.LruCache[K, V] -> K -> (Option[V], Std.LruCache.LruCache[K, V])The value stored under a key, and the cache with that key marked as used.
- Std.LruCache.getOrCompute
&Std.LruCache.LruCache[K, V] -> K -> fn(K) -> V -> (V, Std.LruCache.LruCache[K, V])The value under a key, computing and storing it when it is absent.
- Std.LruCache.isEmpty
&Std.LruCache.LruCache[K, V] -> BoolWhether the cache is holding nothing.
- Std.LruCache.isFull
&Std.LruCache.LruCache[K, V] -> BoolWhether the cache is holding as much as it can.
- Std.LruCache.keys
&Std.LruCache.LruCache[K, V] -> Array[K]Every key, least recently used first.
- Std.LruCache.newest
&Std.LruCache.LruCache[K, V] -> Option[(K, V)]The most recently used entry, or
Nonewhen the cache is empty. - Std.LruCache.oldest
&Std.LruCache.LruCache[K, V] -> Option[(K, V)]The entry that will be discarded next, or
Nonewhen the cache is empty. - Std.LruCache.pairs
&Std.LruCache.LruCache[K, V] -> Array[(K, V)]Every entry as a pair, least recently used first.
- Std.LruCache.peek
&Std.LruCache.LruCache[K, V] -> K -> Option[V]The value stored under a key, without marking it as used.
- Std.LruCache.put
&Std.LruCache.LruCache[K, V] -> K -> V -> Std.LruCache.LruCache[K, V]The cache with an entry added or replaced, and marked as the most recently
- Std.LruCache.remove
&Std.LruCache.LruCache[K, V] -> K -> Std.LruCache.LruCache[K, V]The cache with a key's entry removed, or unchanged when there is none.
- Std.LruCache.resized
&Std.LruCache.LruCache[K, V] -> Int -> Std.LruCache.LruCache[K, V]The cache with a new capacity, discarding the oldest entries if it shrank.
- Std.LruCache.size
&Std.LruCache.LruCache[K, V] -> IntHow many entries the cache is holding.
- Std.LruCache.toMap
&Std.LruCache.LruCache[K, V] -> Map[K, V]The entries as an ordinary map, losing the recency order and the bound.
- Std.LruCache.values
&Std.LruCache.LruCache[K, V] -> Array[V]Every value, least recently used first.
- Std.LruCache.withCapacity
Int -> Std.LruCache.LruCache[K, V]A cache holding at most
capacityentries.
