fix(storage): use wall-clock TTL and half-lifetime margin for presigned URL cache (#541)

* fix(storage): use wall-clock TTL and half-lifetime margin for presigned URL cache

* test(e2e): eliminate offline race in uploader resilience harness test
This commit is contained in:
Yiling-J
2026-11-23 13:39:31 +08:00
committed by GitHub
parent eeb41fee03
commit db628e65fa
6 changed files with 160 additions and 12 deletions
+3 -2
View File
@@ -101,10 +101,11 @@ export class LruTtlCache<TKey, TValue> {
}
/**
* Monotonic time source to avoid issues with system clock jumps.
* Wall-clock time source so TTLs reflect real elapsed time across host sleep / VM suspend
* and stay aligned with wall-clock expirations such as presigned URL timestamps.
*/
private now(): number {
return performance.now()
return Date.now()
}
get size(): number {