putAsync

abstract suspend fun putAsync(key: K, creationFunction: suspend (key: K) -> V?): Deferred<V?>

Creates a new entry for key using creationFunction and returns a Deferred. Any existing value or in-progress creation of key would be replaced by the new function. You can imply that the creation has failed by returning null.