Attempt to free l amount of cache space this method is called once after an insert would have failed due to space constraints.
Attempt to free l amount of cache space this method is called once after an insert would have failed due to space constraints. After this method returns the insert will be retried
Lookup the value for key k
Lookup the value for key k
Some(v) if the value was cached, None otherwise
Maximum size of the cache
Return the size of a a given cache item If items are objects (for example) this might just be: (x) => 1 If items are arrays of ints and the maxSize is in bytes this function might be: (x) => x.
Return the size of a a given cache item If items are objects (for example) this might just be: (x) => 1 If items are arrays of ints and the maxSize is in bytes this function might be: (x) => x.length * 4
returns true iff v can be inserted into the cache without violating the size boundary
Lookup the value for key k If the value is in the cache, return it.
Lookup the value for key k If the value is in the cache, return it. Otherwise, insert the value v and return it
Note: This method does not guarantee that v will be in the cache when it returns
the cached value keyed to k or the computed value of v
Insert the value v (keyed by k) into the cache
Insert the value v (keyed by k) into the cache
true if the value was inserted into the cache
Remove k from the cache
Remove k from the cache
(boundedCache: StringAdd).self
(boundedCache: StringFormat).self
(boundedCache: ArrowAssoc[BoundedCache[K, V]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(boundedCache: Ensuring[BoundedCache[K, V]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
A hash backed cache with a size boundary Operations on this cache may required O(N) time to execute (N = size of cache)