Extend cache time of map data
This commit is contained in:
parent
8100ff76be
commit
a0cdde3ab2
@ -50,7 +50,7 @@ export async function getMapData(hash: string): Promise<MapData | undefined> {
|
|||||||
bsr: jsonResponse.id,
|
bsr: jsonResponse.id,
|
||||||
mapArt: getLatestMapArt(jsonResponse),
|
mapArt: getLatestMapArt(jsonResponse),
|
||||||
};
|
};
|
||||||
await setValue(key, JSON.stringify(json));
|
await setValue(key, JSON.stringify(json), 86400 * 7); // Expire in a week
|
||||||
console.log(
|
console.log(
|
||||||
`[Cache]: Cached BS Map Data for hash ${mapHash} in ${
|
`[Cache]: Cached BS Map Data for hash ${mapHash} in ${
|
||||||
Date.now() - before
|
Date.now() - before
|
||||||
|
Reference in New Issue
Block a user