From 3d90df689781b053a12dbafaea9358dd5f368358 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 30 Jan 2023 23:58:11 +0600 Subject: [PATCH] Update AutoRecacheWriteKeyValueRepo.kt --- .../cache/fallback/keyvalue/AutoRecacheWriteKeyValueRepo.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalue/AutoRecacheWriteKeyValueRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalue/AutoRecacheWriteKeyValueRepo.kt index ca91a0a19f2..fef2e946046 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalue/AutoRecacheWriteKeyValueRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalue/AutoRecacheWriteKeyValueRepo.kt @@ -4,6 +4,7 @@ import dev.inmo.micro_utils.coroutines.plus import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions import dev.inmo.micro_utils.repos.WriteKeyValueRepo 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.unset import kotlinx.coroutines.CoroutineScope @@ -14,7 +15,7 @@ open class AutoRecacheWriteKeyValueRepo( protected val originalRepo: WriteKeyValueRepo, protected val scope: CoroutineScope, protected val kvCache: FullKVCache = FullKVCache() -) : WriteKeyValueRepo { +) : WriteKeyValueRepo, FallbackCacheRepo { override val onValueRemoved: Flow get() = (originalRepo.onValueRemoved + kvCache.onValueRemoved).distinctUntilChanged()