cache

fun cache(builder: KordCacheBuilder.(resources: ClientResources) -> Unit)(source)

Configures the DataCache for caching.

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