File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
packages/utils/src/lib/server/cache Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,6 @@ export class S3Cache<V extends Uint8Array = Uint8Array> extends BaseCache<V> {
48
48
return `${ this . #options. keyPrefix ?? '' } ${ key } ` ;
49
49
}
50
50
51
- private async isExpired ( entry : CacheEntry < V > ) : Promise < boolean > {
52
- return entry . expiresAt !== undefined && Date . now ( ) > entry . expiresAt ;
53
- }
54
-
55
51
public async get ( key : string ) : Promise < V | undefined > {
56
52
const s3Key = this . buildKey ( key ) ;
57
53
const head = await this . #client. send (
@@ -87,7 +83,7 @@ export class S3Cache<V extends Uint8Array = Uint8Array> extends BaseCache<V> {
87
83
let expiresAt : number | undefined ;
88
84
if ( ttl !== undefined ) {
89
85
const jitterFn = createJitter ( jitter ?? this . #options. defaultJitter ?? JitterMode . None ) ;
90
- expiresAt = Math . round ( jitterFn ( ttl ) ) ;
86
+ expiresAt = Date . now ( ) + Math . round ( jitterFn ( ttl ) ) ;
91
87
}
92
88
93
89
await this . #client. send (
You can’t perform that action at this time.
0 commit comments