mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2024-06-26 11:38:03 +00:00
16 lines
681 B
Kotlin
16 lines
681 B
Kotlin
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.plaguposter.posts.models.PostId
|
|
import dev.inmo.tgbotapi.types.PollIdentifier
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
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)
|