Package-level declarations

Types

Link copied to clipboard
class CachingGateway(cache: DataCache, gateway: Gateway, dispatcher: CoroutineDispatcher = Dispatchers.Default) : DataCache, Gateway, CoroutineScope

A bridge between DataCache and Gateway that automatically empties cache on disconnect.

Link copied to clipboard
class DataCacheView(cache: DataCache) : DataCache

A DataCacheView that limits removal of cached instances to those inserted in this cache, and not the underlying cache.

Link copied to clipboard
typealias Generator<I, T> = (cache: DataCache, description: DataDescription<T, I>) -> DataEntryCache<out T>
Link copied to clipboard
Link copied to clipboard
class ViewKeys(keySet: MutableSet<Any> = mutableSetOf())

Functions

Link copied to clipboard
fun DataCache.createView(): DataCacheView

Creates a DataCacheView for this view, only removing elements that were added directly to this instance.

Link copied to clipboard
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, Snowflake?>, value: Snowflake?)
@JvmName(name = "optionalNullableIdEq")
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, OptionalSnowflake?>, value: Snowflake?)
@JvmName(name = "optionalIdEq")
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, OptionalSnowflake>, value: Snowflake?)
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, Optional<String>>, value: String?)
@JvmName(name = "booleanEq")
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, Boolean?>, value: Boolean?)
@JvmName(name = "stringEq")
fun <T : Any> QueryBuilder<T>.idEq(property: KProperty1<T, String?>, value: String?)
Link copied to clipboard
fun <T : Any> QueryBuilder<T>.idGt(property: KProperty1<T, Snowflake>, value: Snowflake)
Link copied to clipboard
fun <T : Any> QueryBuilder<T>.idLt(property: KProperty1<T, Snowflake>, value: Snowflake)
Link copied to clipboard
fun <T : Any, I : Any> KordCacheBuilder.lruCache(size: Int = 100): Generator<T, I>

A Generator creating DataEntryCaches with a maximum size, removing items on last insertion. Shortcut for lruLinkedHashMap.