Package-level declarations

Types

Link copied to clipboard
open class CoroutineCache<K, V, S : CoroutineCacheStore<K, V>>(name: String, store: S, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes)

Base class to create a coroutine and StateFlow based cache.

Link copied to clipboard
interface CoroutineCacheStore<K, V>

The actual source and sink of the data to be cached. This could be any database.

Link copied to clipboard
class FullRepositoryCoroutineCache<K, V>(repository: FullRepository<K, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes, valueToKeyMapper: (V) -> K) : CoroutineCache<K, V, FullRepositoryCoroutineCacheStore<K, V>>
class MapDeleteByRoomIdRepositoryCoroutineCache<K1, K2, V>(repository: MapDeleteByRoomIdRepository<K1, K2, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes, keyMapper: (MapRepositoryCoroutinesCacheKey<K1, K2>) -> RoomId) : MapRepositoryCoroutineCache<K1, K2, V>
Link copied to clipboard
open class MapRepositoryCoroutineCache<K1, K2, V>(repository: MapRepository<K1, K2, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes) : CoroutineCache<MapRepositoryCoroutinesCacheKey<K1, K2>, V, MapRepositoryCoroutineCacheStore<K1, K2, V>>
Link copied to clipboard
data class MapRepositoryCoroutinesCacheKey<K1, K2>(val firstKey: K1, val secondKey: K2)
class MinimalDeleteByRoomIdRepositoryCoroutineCache<K, V>(repository: MinimalDeleteByRoomIdRepository<K, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes, keyMapper: (K) -> RoomId) : MinimalRepositoryCoroutineCache<K, V>
Link copied to clipboard
open class MinimalRepositoryCoroutineCache<K, V>(repository: MinimalRepository<K, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes) : CoroutineCache<K, V, CoroutineCacheStore<K, V>>
Link copied to clipboard

An index to track which entries have been added to or removed from the cache.