sharding

fun sharding(shards: (recommended: Int) -> Shards)(source)

Configures the shards this client will connect to, by default 0 until recommended. This can be used to break up to client into multiple processes.

 cache {
defaultGenerator = lruCache(10)
forDescription(UserData.description) { cache, description -> DataEntryCache.none() }
forDescription(MessageData.description) { cache, description ->
MapEntryCache(cache, description, MapLikeCollection.lruLinkedHashMap(100))
}
forDescription(UserData.description) { cache, description ->
MapEntryCache(cache, description, MapLikeCollection.weakHashMap())
}
}