CoroutineLoadingCache

Functions

Link copied to clipboard
abstract override fun asynchronous(): AsyncLoadingCache<K, V>

Returns the AsyncLoadingCache

Link copied to clipboard
abstract suspend fun get(key: K, mappingFunction: suspend (K) -> V?): V?

The coroutines implementation of Cache.get

abstract suspend fun get(key: K): V?

The coroutines implementation of LoadingCache.get

Link copied to clipboard
abstract suspend fun getAll(keys: Iterable<K>, mappingFunction: suspend (Iterable<K>) -> Map<K, V>): Map<K, V>

The coroutines implementation of Cache.getAll

abstract suspend fun getAll(keys: Iterable<K>): Map<K, V>

The coroutines implementation of LoadingCache.getAll Attention: It is executed for each key using CoroutineScope.async. There is a cooperative cancel, so if an error occurs on any key, the other async executions are canceled.

Link copied to clipboard
abstract suspend fun getIfPresent(key: K): V?

The coroutines implementation of Cache.getIfPresent

Link copied to clipboard
abstract fun put(key: K, value: V)

The coroutines implementation of Cache.put

Link copied to clipboard
abstract fun putAll(map: Map<K, V>)

The coroutines implementation of Cache.putAll

Link copied to clipboard
abstract override fun synchronous(): LoadingCache<K, V>

Returns the LoadingCache