Updated on 2026-08-14

This commit is contained in:
Tangem 2023-07-28 17:08:24 +03:00
parent 4e38602301
commit 2317703e37
29 changed files with 369 additions and 169 deletions

View file

@ -10,7 +10,7 @@ internal class DefaultCacheRegistry(
) : CacheRegistry {
override suspend fun isExpired(key: String): Boolean {
val cacheKey = cacheKeysStore.getOrNull(key) ?: return true
val cacheKey = cacheKeysStore.getSyncOrNull(key) ?: return true
return cacheKey.updatedAt
.plus(cacheKey.expiresIn)
@ -34,7 +34,7 @@ internal class DefaultCacheRegistry(
val isExpired = isExpired(key) || skipCache
if (!isExpired) return
cacheKeysStore.addOrReplace(
cacheKeysStore.store(
key = CacheKey(
id = key,
updatedAt = LocalDateTime.now(),