From 1a3ce6e623dec6e33334c646e7ef57bff4df2859 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 7 Sep 2022 23:47:13 +0600 Subject: [PATCH] hotfix --- CHANGELOG.md | 4 ++++ .../dev/inmo/micro_utils/repos/cache/KeyValuesCacheRepo.kt | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9ec8d23cd0..f5cc61bc1b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.12.10 +* `Repos`: + * `Cache`: + * Hotfix in key values `get` + ## 0.12.9 * `Versions`: diff --git a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/KeyValuesCacheRepo.kt b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/KeyValuesCacheRepo.kt index 346454e0572..c251b852746 100644 --- a/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/KeyValuesCacheRepo.kt +++ b/repos/cache/src/commonMain/kotlin/dev/inmo/micro_utils/repos/cache/KeyValuesCacheRepo.kt @@ -13,10 +13,8 @@ open class ReadKeyValuesCacheRepo( protected open val kvCache: KVCache> ) : ReadKeyValuesRepo by parentRepo, CacheRepo { override suspend fun get(k: Key, pagination: Pagination, reversed: Boolean): PaginationResult { - val count = count(k) - return getAll(k, reversed).createPaginationResult( - pagination, - count + return getAll(k, reversed).paginate( + pagination ) } override suspend fun getAll(k: Key, reversed: Boolean): List {