MinimalRepositoryCoroutineCache

open class MinimalRepositoryCoroutineCache<K, V>(repository: MinimalRepository<K, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes) : CoroutineCache<K, V, CoroutineCacheStore<K, V>>

Inheritors

Constructors

Link copied to clipboard
constructor(repository: MinimalRepository<K, V>, tm: TransactionManager, cacheScope: CoroutineScope, expireDuration: Duration = 1.minutes)

Properties

Link copied to clipboard
val values: SharedFlow<Map<K, 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
fun read(key: K): Flow<V?>
Link copied to clipboard
suspend fun write(key: K, value: V?, persistEnabled: Boolean = true, onPersist: (newValue: V?) -> Unit = {})
suspend fun write(key: K, persistEnabled: Boolean = true, onPersist: (newValue: V?) -> Unit = {}, updater: suspend (oldValue: V?) -> V?)