From 4e97ce86aaeef7bd47d7f458bdb6260f326b69b3 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 25 Apr 2023 17:39:14 +0600 Subject: [PATCH] add defauult value to kvCache in fullyCached --- .../dev/inmo/micro_utils/repos/cache/full/FullCRUDCacheRepo.kt | 2 +- .../inmo/micro_utils/repos/cache/full/FullKeyValueCacheRepo.kt | 2 +- .../inmo/micro_utils/repos/cache/full/FullKeyValuesCacheRepo.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullCRUDCacheRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullCRUDCacheRepo.kt index 080a5a00a46..f5b55e92148 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullCRUDCacheRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullCRUDCacheRepo.kt @@ -103,7 +103,7 @@ open class FullCRUDCacheRepo( } fun CRUDRepo.fullyCached( - kvCache: FullKVCache, + kvCache: FullKVCache = FullKVCache(), scope: CoroutineScope = CoroutineScope(Dispatchers.Default), idGetter: (ObjectType) -> IdType ) = FullCRUDCacheRepo(this, kvCache, scope, idGetter) diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValueCacheRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValueCacheRepo.kt index 4b976b75e29..39e96edc1a8 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValueCacheRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValueCacheRepo.kt @@ -118,7 +118,7 @@ open class FullKeyValueCacheRepo( } fun KeyValueRepo.fullyCached( - kvCache: FullKVCache, + kvCache: FullKVCache = FullKVCache(), scope: CoroutineScope = CoroutineScope(Dispatchers.Default) ) = FullKeyValueCacheRepo(this, kvCache, scope) diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValuesCacheRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValuesCacheRepo.kt index ae2e6be1cf0..c2ecb6679d3 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValuesCacheRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/full/FullKeyValuesCacheRepo.kt @@ -160,7 +160,7 @@ open class FullKeyValuesCacheRepo( } fun KeyValuesRepo.fullyCached( - kvCache: FullKVCache>, + kvCache: FullKVCache> = FullKVCache(), scope: CoroutineScope = CoroutineScope(Dispatchers.Default) ) = FullKeyValuesCacheRepo(this, kvCache, scope)