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:
parent
555a3e4930
commit
6fbda43855
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user