getOrDefault

abstract suspend fun getOrDefault(key: K, defaultValue: V): V

Returns the value for key if it exists in the cache or waits for its creation if it is currently in progress. This returns defaultValue if a value is neither cached nor under creation or cannot be created.

It may even throw exceptions for unhandled exceptions in the currently in-progress creation block.