TwoDimensionsRepositoryStateFlowCache

class TwoDimensionsRepositoryStateFlowCache<K1, K2, V, R : TwoDimensionsRepository<K1, K2, V>>(cacheScope: CoroutineScope, repository: R, tm: TransactionManager, expireDuration: Duration = 1.minutes)

Constructors

Link copied to clipboard
constructor(cacheScope: CoroutineScope, repository: R, tm: TransactionManager, expireDuration: Duration = 1.minutes)

Functions

Link copied to clipboard
fun get(key: K1): Flow<Map<K2, V>?>
Link copied to clipboard
fun getBySecondKey(firstKey: K1, secondKey: K2): Flow<V?>
Link copied to clipboard
fun reset()
Link copied to clipboard
suspend fun saveBySecondKey(firstKey: K1, secondKey: K2, value: V?)
Link copied to clipboard
suspend fun update(key: K1, persistIntoRepository: Boolean = true, onPersist: suspend (newValue: Map<K2, V>?) -> Unit = {}, updater: suspend (oldValue: Map<K2, V>?) -> Map<K2, V>?)
Link copied to clipboard
suspend fun updateBySecondKey(firstKey: K1, secondKey: K2, updater: suspend (V?) -> V?)