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

Reduce the cache expiration

This commit is contained in:
AnxietyisReal 2023-10-04 00:21:17 +11:00
parent 73c0621c46
commit cda1a75ea6

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)=>{ export default async(client:TClient, YTChannelID:string, YTChannelName:string, DiscordChannelID:string, DiscordRoleID:string)=>{
let Data: any; 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 { try {
await fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=${YTChannelID}`, { await fetch(`https://www.youtube.com/feeds/videos.xml?channel_id=${YTChannelID}`, {
signal: AbortSignal.timeout(10000), signal: AbortSignal.timeout(10000),