File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { anonymizeKey } from "../util/anonymize-key";
8
8
9
9
const LOG_PREFIX = `[CACHE]` ;
10
10
const CACHE_STATE_PREFIX = "cache-state:" ;
11
- const CACHE_STATE_TTL = 30 * 60 * 1000 ; // 30 minutes
11
+ const CACHE_STATE_SECONDS_TTL = 1800 ; // 30 minutes
12
12
13
13
export class StorageCache implements ContactCache {
14
14
private storage : StorageAdapter ;
@@ -153,7 +153,7 @@ export class StorageCache implements ContactCache {
153
153
{
154
154
state : CacheItemStateType . FETCHING ,
155
155
} ,
156
- CACHE_STATE_TTL
156
+ CACHE_STATE_SECONDS_TTL
157
157
) ;
158
158
159
159
try {
@@ -171,7 +171,7 @@ export class StorageCache implements ContactCache {
171
171
//in any case we need to reset the cacheItemState to prevent loop of fetching state
172
172
await this . storage . set < CacheItemState > ( this . getCacheItemKey ( key ) , {
173
173
state : CacheItemStateType . CACHED ,
174
- updated : new Date ( ) . getTime ( ) ,
174
+ updated : Date . now ( ) ,
175
175
} ) ;
176
176
}
177
177
}
You can’t perform that action at this time.
0 commit comments