Returns either the cached Future for the given key or evaluates the given value generating
function producing a Future[V]
.
Returns a snapshot view of the keys as an iterator, traversing the keys from the least likely to be retained to the most likely.
Returns a snapshot view of the keys as an iterator, traversing the keys from the least likely to be retained to the most likely. Note that this is not constant time.
No more than limit keys will be returned
Clears the cache by removing all entries.
Retrieves the future instance that is currently in the cache for the given key.
Retrieves the future instance that is currently in the cache for the given key. Returns None if the key has no corresponding cache entry.
Returns the set of keys in the cache, in no particular order Should return in roughly constant time.
Returns the set of keys in the cache, in no particular order Should return in roughly constant time. Note that this number might not reflect the exact keys of active, unexpired cache entries, since expired entries are only evicted upon next access (or by being thrown out by a capacity constraint).
Removes the cache item for the given key.
Removes the cache item for the given key. Returns the removed item if it was found (and removed).
Returns the upper bound for the number of currently cached entries.
Returns the upper bound for the number of currently cached entries. Note that this number might not reflect the exact number of active, unexpired cache entries, since expired entries are only evicted upon next access (or by being thrown out by a capacity constraint).
Selects the (potentially non-existing) cache entry with the given key.
General interface implemented by all spray cache implementations.