getOrPut

abstract suspend fun getOrPut(key: String, creationFunction: suspend (C) -> Boolean): C?

Returns the container for key if it exists in the cache, its creation is in progress or can be created by creationFunction. This returns null if a container is not cached and cannot be created. You can imply that the creation has failed by returning false. Any unhandled exceptions inside creationFunction won't be handled.