Updated on 2026-08-14
This commit is contained in:
parent
4e38602301
commit
2317703e37
29 changed files with 369 additions and 169 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue