mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 14:47:15 +00:00
fixes
This commit is contained in:
parent
605f55acd2
commit
46178e723b
@ -3,11 +3,9 @@ package dev.inmo.micro_utils.repos.cache.full
|
||||
import dev.inmo.micro_utils.common.*
|
||||
import dev.inmo.micro_utils.pagination.Pagination
|
||||
import dev.inmo.micro_utils.pagination.PaginationResult
|
||||
import dev.inmo.micro_utils.pagination.utils.doForAllWithNextPaging
|
||||
import dev.inmo.micro_utils.repos.*
|
||||
import dev.inmo.micro_utils.repos.cache.*
|
||||
import dev.inmo.micro_utils.repos.cache.cache.FullKVCache
|
||||
import dev.inmo.micro_utils.repos.cache.cache.KVCache
|
||||
import dev.inmo.micro_utils.repos.cache.util.actualizeAll
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
@ -9,6 +9,7 @@ import dev.inmo.micro_utils.repos.cache.util.actualizeAll
|
||||
import dev.inmo.micro_utils.repos.pagination.getAll
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.*
|
||||
|
||||
open class FullReadKeyValueCacheRepo<Key,Value>(
|
||||
@ -80,7 +81,7 @@ fun <Key, Value> ReadKeyValueRepo<Key, Value>.cached(
|
||||
) = FullReadKeyValueCacheRepo(this, kvCache)
|
||||
|
||||
open class FullWriteKeyValueCacheRepo<Key,Value>(
|
||||
protected open val parentRepo: WriteKeyValueRepo<Key, Value>,
|
||||
parentRepo: WriteKeyValueRepo<Key, Value>,
|
||||
protected open val kvCache: FullKVCache<Key, Value>,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
|
||||
) : WriteKeyValueRepo<Key, Value> by parentRepo, FullCacheRepo {
|
||||
@ -98,7 +99,7 @@ fun <Key, Value> WriteKeyValueRepo<Key, Value>.caching(
|
||||
) = FullWriteKeyValueCacheRepo(this, kvCache, scope)
|
||||
|
||||
open class FullKeyValueCacheRepo<Key,Value>(
|
||||
override val parentRepo: KeyValueRepo<Key, Value>,
|
||||
protected open val parentRepo: KeyValueRepo<Key, Value>,
|
||||
kvCache: FullKVCache<Key, Value>,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
|
||||
) : FullWriteKeyValueCacheRepo<Key,Value>(parentRepo, kvCache, scope),
|
||||
|
@ -112,7 +112,7 @@ fun <Key, Value> ReadKeyValuesRepo<Key, Value>.cached(
|
||||
) = FullReadKeyValuesCacheRepo(this, kvCache)
|
||||
|
||||
open class FullWriteKeyValuesCacheRepo<Key,Value>(
|
||||
protected open val parentRepo: WriteKeyValuesRepo<Key, Value>,
|
||||
parentRepo: WriteKeyValuesRepo<Key, Value>,
|
||||
protected open val kvCache: FullKVCache<Key, List<Value>>,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
|
||||
) : WriteKeyValuesRepo<Key, Value> by parentRepo, FullCacheRepo {
|
||||
@ -140,7 +140,7 @@ fun <Key, Value> WriteKeyValuesRepo<Key, Value>.caching(
|
||||
) = FullWriteKeyValuesCacheRepo(this, kvCache, scope)
|
||||
|
||||
open class FullKeyValuesCacheRepo<Key,Value>(
|
||||
override val parentRepo: KeyValuesRepo<Key, Value>,
|
||||
protected open val parentRepo: KeyValuesRepo<Key, Value>,
|
||||
kvCache: FullKVCache<Key, List<Value>>,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
|
||||
) : FullWriteKeyValuesCacheRepo<Key, Value>(parentRepo, kvCache, scope),
|
||||
|
Loading…
Reference in New Issue
Block a user