Attempt to free l amount of cache space this method is called once after an insert would have failed due to space constraints.
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.
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.
the cached value keyed to k or the computed value of v
Insert the value v (keyed by k) into the cache
Remove k from the cache