View this cache as an immutable Map.
View this cache as an immutable Map. The returned Map is a snapshot of the cache, i.e. any changes to the cache, both incremental and bulk-reloads, are not reflected in the returned Map.
Peek if the given key is cached, resolved and present or not.
Peek if the given key is cached, resolved and present or not. If it is, it returns a Some of the value, otherwise None. This works by flattening down the return value of peek. This method does not trigger a remote call if the given key is not cached already.
Try to load a value from the cache with the given key.
Try to load a value from the cache with the given key. A cache miss may cause a remote call to look for the value, depending on the cache implementation.
Test if the cache has been started.
Test if the cache has been started.
Peek if the given key is already cached or not.
Peek if the given key is already cached or not. If it is, it returns a Some of cached Future, otherwise None. This method does not trigger a remote call if the given key is not cached already.
Register an AsyncCacheEventHandler
to be notified for cache events.
Register an AsyncCacheEventHandler
to be notified for cache events.
- the handler to be notified for cache events
Stop the cache from loading.
Stop the cache from loading.
Starts the loading of the cache.
Starts the loading of the cache.
Trait that describes an asynchronous cache. AsyncCache is expected to be incomplete in memory and thus return value as Future[Option[V]] indicating that the value may need to be lazy-loaded by issuing a remote call.
28/Jul/2014 15:58