diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/crud/AutoRecacheWriteCRUDRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/crud/AutoRecacheWriteCRUDRepo.kt index ca15411096e..f3ff4c15ff2 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/crud/AutoRecacheWriteCRUDRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/crud/AutoRecacheWriteCRUDRepo.kt @@ -21,9 +21,9 @@ open class AutoRecacheWriteCRUDRepo( protected val idGetter: (RegisteredObject) -> Id ) : WriteCRUDRepo, FallbackCacheRepo { override val deletedObjectsIdsFlow: Flow - get() = (originalRepo.deletedObjectsIdsFlow + kvCache.onValueRemoved).distinctUntilChanged() + get() = (originalRepo.deletedObjectsIdsFlow).distinctUntilChanged() override val newObjectsFlow: Flow - get() = (originalRepo.newObjectsFlow + kvCache.onNewValue.map { it.second }).distinctUntilChanged() + get() = (originalRepo.newObjectsFlow).distinctUntilChanged() override val updatedObjectsFlow: Flow get() = originalRepo.updatedObjectsFlow 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 8a725629b36..68f18b5391e 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 @@ -17,10 +17,10 @@ open class AutoRecacheWriteKeyValueRepo( protected val kvCache: FullKVCache = FullKVCache() ) : WriteKeyValueRepo, FallbackCacheRepo { override val onValueRemoved: Flow - get() = (originalRepo.onValueRemoved + kvCache.onValueRemoved).distinctUntilChanged() + get() = (originalRepo.onValueRemoved).distinctUntilChanged() override val onNewValue: Flow> - get() = (originalRepo.onNewValue + kvCache.onNewValue).distinctUntilChanged() + get() = (originalRepo.onNewValue).distinctUntilChanged() private val onRemovingUpdatesListeningJob = originalRepo.onValueRemoved.subscribeSafelyWithoutExceptions(scope) { kvCache.unset(it) diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalues/AutoRecacheWriteKeyValuesRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalues/AutoRecacheWriteKeyValuesRepo.kt index 86ca7c71c85..cd34593ec3c 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalues/AutoRecacheWriteKeyValuesRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/fallback/keyvalues/AutoRecacheWriteKeyValuesRepo.kt @@ -25,7 +25,7 @@ open class AutoRecacheWriteKeyValuesRepo( override val onNewValue: Flow> get() = originalRepo.onNewValue override val onDataCleared: Flow - get() = (originalRepo.onDataCleared + kvCache.onValueRemoved).distinctUntilChanged() + get() = (originalRepo.onDataCleared).distinctUntilChanged() private val onDataClearedListeningJob = originalRepo.onDataCleared.subscribeSafelyWithoutExceptions(scope) { kvCache.unset(it)