Updated on 2026-08-14
This commit is contained in:
parent
bc70ed5327
commit
ccd7a7dd18
11 changed files with 98 additions and 39 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue