add defauult value to kvCache in fullyCached

This commit is contained in:
InsanusMokrassar 2023-04-25 17:39:14 +06:00
parent 315a7cb29e
commit 4e97ce86aa
3 changed files with 3 additions and 3 deletions

View File

@ -103,7 +103,7 @@ open class FullCRUDCacheRepo<ObjectType, IdType, InputValueType>(
}
fun <ObjectType, IdType, InputType> CRUDRepo<ObjectType, IdType, InputType>.fullyCached(
kvCache: FullKVCache<IdType, ObjectType>,
kvCache: FullKVCache<IdType, ObjectType> = FullKVCache(),
scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
idGetter: (ObjectType) -> IdType
) = FullCRUDCacheRepo(this, kvCache, scope, idGetter)

View File

@ -118,7 +118,7 @@ open class FullKeyValueCacheRepo<Key,Value>(
}
fun <Key, Value> KeyValueRepo<Key, Value>.fullyCached(
kvCache: FullKVCache<Key, Value>,
kvCache: FullKVCache<Key, Value> = FullKVCache(),
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
) = FullKeyValueCacheRepo(this, kvCache, scope)

View File

@ -160,7 +160,7 @@ open class FullKeyValuesCacheRepo<Key,Value>(
}
fun <Key, Value> KeyValuesRepo<Key, Value>.fullyCached(
kvCache: FullKVCache<Key, List<Value>>,
kvCache: FullKVCache<Key, List<Value>> = FullKVCache(),
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
) = FullKeyValuesCacheRepo(this, kvCache, scope)