mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 21:04:59 +00:00
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:
+3
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user