MapDeleteByRoomIdRepositoryCoroutineCache

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>

Constructors

constructor(repository: MapDeleteByRoomIdRepository<K1, K2, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes, keyMapper: (MapRepositoryCoroutinesCacheKey<K1, K2>) -> RoomId)

Properties

Link copied to clipboard
val values: SharedFlow<Map<MapRepositoryCoroutinesCacheKey<K1, K2>, StateFlow<V?>>>

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun clear()
Link copied to clipboard
suspend fun deleteAll()
Link copied to clipboard
suspend fun deleteByRoomId(roomId: RoomId)
Link copied to clipboard
Link copied to clipboard
fun readByFirstKey(key: K1): Flow<Map<K2, Flow<V?>>?>
Link copied to clipboard
suspend fun write(key: MapRepositoryCoroutinesCacheKey<K1, K2>, value: V?, persistEnabled: Boolean = true, onPersist: (newValue: V?) -> Unit = {})
suspend fun write(key: MapRepositoryCoroutinesCacheKey<K1, K2>, persistEnabled: Boolean = true, onPersist: (newValue: V?) -> Unit = {}, updater: suspend (oldValue: V?) -> V?)