mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-17 13:53:49 +00:00
Update AutoRecacheWriteKeyValuesRepo.kt
This commit is contained in:
parent
428eabb1bd
commit
b64f2e6d32
@ -6,6 +6,7 @@ import dev.inmo.micro_utils.pagination.FirstPagePagination
|
|||||||
import dev.inmo.micro_utils.pagination.utils.doForAllWithNextPaging
|
import dev.inmo.micro_utils.pagination.utils.doForAllWithNextPaging
|
||||||
import dev.inmo.micro_utils.repos.WriteKeyValuesRepo
|
import dev.inmo.micro_utils.repos.WriteKeyValuesRepo
|
||||||
import dev.inmo.micro_utils.repos.cache.cache.FullKVCache
|
import dev.inmo.micro_utils.repos.cache.cache.FullKVCache
|
||||||
|
import dev.inmo.micro_utils.repos.cache.FallbackCacheRepo
|
||||||
import dev.inmo.micro_utils.repos.set
|
import dev.inmo.micro_utils.repos.set
|
||||||
import dev.inmo.micro_utils.repos.unset
|
import dev.inmo.micro_utils.repos.unset
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
@ -16,7 +17,7 @@ open class AutoRecacheWriteKeyValuesRepo<Id, RegisteredObject>(
|
|||||||
protected val originalRepo: WriteKeyValuesRepo<Id, RegisteredObject>,
|
protected val originalRepo: WriteKeyValuesRepo<Id, RegisteredObject>,
|
||||||
protected val scope: CoroutineScope,
|
protected val scope: CoroutineScope,
|
||||||
protected val kvCache: FullKVCache<Id, List<RegisteredObject>> = FullKVCache()
|
protected val kvCache: FullKVCache<Id, List<RegisteredObject>> = FullKVCache()
|
||||||
) : WriteKeyValuesRepo<Id, RegisteredObject> {
|
) : WriteKeyValuesRepo<Id, RegisteredObject>, FallbackCacheRepo {
|
||||||
override val onValueRemoved: Flow<Pair<Id, RegisteredObject>>
|
override val onValueRemoved: Flow<Pair<Id, RegisteredObject>>
|
||||||
get() = originalRepo.onValueRemoved
|
get() = originalRepo.onValueRemoved
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user