I am trying to implement a high performance thread-safe caching. Here is the code I have implemented. I don\'t want any on demand computing. Can I use cache.asMap() and retrieve
Yes, that looks just fine, although I'm not sure what the point is of wrapping the cache in another object. (Also, Cache.getIfPresent(key) is fully equivalent to Cache.asMap().get(key).)