Merge pull request #207 from ajayyy/redis

Only cache for all categories
This commit is contained in:
Ajay Ramachandran 2021-02-20 22:03:15 -05:00 committed by GitHub
commit ef79439557
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
}