Hello Team, how can i do this right in kotlin ...
# getting-started
o
Hello Team, how can i do this right in kotlin
Copy code
fun getUserFromDB(id: Long): String? {}

cache.computeIfAbsent(agentId, { id -> getUserFromDB(agentId)})
it gives me an error since getUserFromDB has String? return type which can not be used with the supplied function i am using a concurrentHashMap for cache