1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00

Reduce the cache expiration

This commit is contained in:
AnxietyisReal 2023-10-04 00:21:17 +11:00
parent 555a3e4930
commit 6fbda43855

View File

@ -6,7 +6,7 @@ import MessageTool from '../helpers/MessageTool.js';
export default async(client:TClient, YTChannelID:string, YTChannelName:string, DiscordChannelID:string, DiscordRoleID:string)=>{
let Data: any;
let cacheExpiry: number = 14400; // Invalidate cache after sitting in Redis for 4 hours
let cacheExpiry: number = 7200; // Invalidate cache after sitting in Redis for 2 hours
try {
await fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=${YTChannelID}`, {
signal: AbortSignal.timeout(10000),