1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-12-27 04:15:38 -05:00

Reduce the cache expiration

This commit is contained in:
toast-ts 2023-10-04 00:21:17 +11:00
parent 1a8437daf6
commit 0f5877ce7f

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),