feat: Update cache expiration times for event list and match info
- Increased the cache expiration time for event lists from 30 minutes to 72 hours. - Increased the cache expiration time for match info from 3 minutes to 72 hours.
This commit is contained in:
parent
ac3beb5d8f
commit
58edba247d
@ -44,7 +44,7 @@ export async function listEvent(tagid: string): Promise<IEventInfo[]> {
|
|||||||
let html = await redis.get(key);
|
let html = await redis.get(key);
|
||||||
if (!html) {
|
if (!html) {
|
||||||
html = await fetchEventListHTML(tagid);
|
html = await fetchEventListHTML(tagid);
|
||||||
await redis.setex(key, 60 * 30, html);
|
await redis.setex(key, 60 * 60 * 72, html);
|
||||||
}
|
}
|
||||||
return parseEventList(html);
|
return parseEventList(html);
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ export async function getMatchInfo(matchId: string) {
|
|||||||
let html = await redis.get(key);
|
let html = await redis.get(key);
|
||||||
if (!html) {
|
if (!html) {
|
||||||
html = await fetchEventContentHTML(matchId);
|
html = await fetchEventContentHTML(matchId);
|
||||||
await redis.setex(key, 60 * 3, html);
|
await redis.setex(key, 60 * 72, html);
|
||||||
}
|
}
|
||||||
return parseEventInfo(html);
|
return parseEventInfo(html);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user