mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2025-09-15 04:59:41 +00:00
small fixes in repos
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package dev.inmo.plaguposter.ratings.source.repos
|
||||
|
||||
import dev.inmo.micro_utils.repos.KeyValueRepo
|
||||
import dev.inmo.micro_utils.repos.cache.KeyValueCacheRepo
|
||||
import dev.inmo.micro_utils.repos.cache.cache.FullKVCache
|
||||
import dev.inmo.micro_utils.repos.cache.full.cached
|
||||
import dev.inmo.micro_utils.repos.cache.full.fullyCached
|
||||
import dev.inmo.plaguposter.common.ShortMessageInfo
|
||||
import dev.inmo.tgbotapi.types.PollIdentifier
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@@ -12,4 +11,4 @@ class CachedPollsToMessagesInfoRepo(
|
||||
private val repo: PollsToMessagesInfoRepo,
|
||||
private val scope: CoroutineScope,
|
||||
private val kvCache: FullKVCache<PollIdentifier, ShortMessageInfo> = FullKVCache()
|
||||
) : PollsToMessagesInfoRepo, KeyValueRepo<PollIdentifier, ShortMessageInfo> by repo.cached(kvCache, scope)
|
||||
) : PollsToMessagesInfoRepo, KeyValueRepo<PollIdentifier, ShortMessageInfo> by repo.fullyCached(kvCache, scope)
|
||||
|
@@ -2,8 +2,7 @@ package dev.inmo.plaguposter.ratings.source.repos
|
||||
|
||||
import dev.inmo.micro_utils.repos.KeyValueRepo
|
||||
import dev.inmo.micro_utils.repos.cache.cache.FullKVCache
|
||||
import dev.inmo.micro_utils.repos.cache.full.cached
|
||||
import dev.inmo.plaguposter.common.ShortMessageInfo
|
||||
import dev.inmo.micro_utils.repos.cache.full.fullyCached
|
||||
import dev.inmo.plaguposter.posts.models.PostId
|
||||
import dev.inmo.tgbotapi.types.PollIdentifier
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
@@ -12,4 +11,4 @@ class CachedPollsToPostsIdsRepo(
|
||||
private val repo: PollsToPostsIdsRepo,
|
||||
private val scope: CoroutineScope,
|
||||
private val kvCache: FullKVCache<PollIdentifier, PostId> = FullKVCache()
|
||||
) : PollsToPostsIdsRepo, KeyValueRepo<PollIdentifier, PostId> by repo.cached(kvCache, scope)
|
||||
) : PollsToPostsIdsRepo, KeyValueRepo<PollIdentifier, PostId> by repo.fullyCached(kvCache, scope)
|
||||
|
Reference in New Issue
Block a user