Wrapper that obtains the desired object from a "MissHandler" if a cache miss occures.
This is a simple way to implement a common usage pattern - that of testing the cache,
if a null is returned then obtain the object, and then add it to the cache. This cache
implements key level locking (synchronization) so the cache will not block while
the miss handler is being called (unless the requests are all for the same object).
The miss handler is asumed to be thead safe, however only one call per key will be made
concurrently.
|