diff --git a/lib/routes/youtube/utils.tsx b/lib/routes/youtube/utils.tsx index 4cb4c3171..563aa3dd9 100644 --- a/lib/routes/youtube/utils.tsx +++ b/lib/routes/youtube/utils.tsx @@ -118,17 +118,22 @@ export async function getSubscriptionsRecusive(part, nextPageToken?) { // taken from https://webapps.stackexchange.com/a/101153 export const isYouTubeChannelId = (id) => /^UC[\w-]{21}[AQgw]$/.test(id); export const getLive = (id, cache) => - cache.tryGet(`youtube:getLive:${id}`, async () => { - const res = await exec((youtube) => - youtube.search.list({ - part: 'snippet', - channelId: id, - eventType: 'live', - type: 'video', - }) - ); - return res; - }); + cache.tryGet( + `youtube:getLive:${id}`, + async () => { + const res = await exec((youtube) => + youtube.search.list({ + part: 'snippet', + channelId: id, + eventType: 'live', + type: 'video', + }) + ); + return res; + }, + config.cache.routeExpire, + false + ); export const getVideoUrl = (id: string) => `https://www.youtube-nocookie.com/embed/${id}?controls=1&autoplay=1&mute=0`; // Get the appropriate playlist ID with or without shorts