Skip to content

Commit 069ca6d

Browse files
ottenhoffdmitrizagidulin
authored andcommitted
Fix caching milliseconds mismatch
Signed-off-by: Sam Ottenhoff <ottenhoff@longsight.com>
1 parent cfb2028 commit 069ca6d

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/lib/verifiableObject.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ export function extractCredentialsFrom(
3636
return null
3737
}
3838

39-
/* Verification expiration = 30 days */
40-
const VERIFICATION_EXPIRATION = 1000 * 30
41-
const lruCache = new LruCache({ maxAge: VERIFICATION_EXPIRATION })
39+
/* Cache verification results briefly to avoid duplicate UI verification work. */
40+
const VERIFICATION_CACHE_TTL_MINUTES = 15
41+
const lruCache = new LruCache({
42+
maxAge: VERIFICATION_CACHE_TTL_MINUTES * 60 * 1000
43+
})
4244
export type VerificationResult = {
4345
timestamp: number | null
4446
log: ResultLog[]

0 commit comments

Comments
 (0)