Only cache for all categories

This commit is contained in:
Ajay Ramachandran
2021-02-20 22:02:57 -05:00
parent 01d318d902
commit 8c910b67b4

View File

@@ -253,7 +253,7 @@ async function handleGetSegments(req: Request, res: Response): Promise<Segment[]
res.sendStatus(404);
// Save in cache
redis.setAsync(skipSegmentsKey(videoID), JSON.stringify(segments));
if (categories.length == 7) redis.setAsync(skipSegmentsKey(videoID), JSON.stringify(segments));
return false;
}