Build a new LRU containing the given key/value
Build a new LRU containing the given key/value
a tuple with of the following two items: _1 represents the evicted entry (if the given lru is at the maximum size) or None if the lru is not at capacity yet. _2 is the new lru with the given key/value pair inserted.
If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed.
If the key is present in the cache, returns the pair of Some(value) and the cache with the key's entry as the most recently accessed. Else, returns None and the unmodified cache.
the Set
of all keys in the LRU
the Set
of all keys in the LRU
accessing this set does not update the element LRU ordering
If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed.
If the key is present in the cache, returns the pair of Some(value) and the cache with the key removed. Else, returns None and the unmodified cache.
the number of entries in the cache
An immutable key/value store that evicts the least recently accessed elements to stay constrained in a maximum size bound.