Updated on 2026-08-14

This commit is contained in:
Tangem 2025-03-13 15:55:28 +03:00
parent bc70ed5327
commit ccd7a7dd18
11 changed files with 98 additions and 39 deletions

View file

@ -19,11 +19,10 @@ internal class DefaultCacheRegistry(
private val mutexes = ConcurrentHashMap<String, Mutex>()
override suspend fun isExpired(key: String): Boolean {
val cacheKey = cacheKeysStore.getSyncOrNull(key) ?: return true
cacheKeysStore.getSyncOrNull(key) ?: return true
return cacheKey.updatedAt
.plus(cacheKey.expiresIn)
.isBefore(LocalDateTime.now())
// disabled cache expiration by time, update always using refresh flag
return false
}
override suspend fun invalidate(key: String) {