Add caching for raw videoID fetching

This commit is contained in:
Ajay Ramachandran
2021-05-23 12:03:05 -04:00
parent 96ccbbe4a2
commit 9d19c59d44
4 changed files with 43 additions and 46 deletions

View File

@@ -469,7 +469,7 @@ export async function voteOnSponsorTime(req: Request, res: Response) {
function clearRedisCache(videoInfo: { videoID: VideoID; hashedVideoID: VideoIDHash; service: Service; }) {
if (videoInfo) {
redis.delAsync(skipSegmentsKey(videoInfo.videoID));
redis.delAsync(skipSegmentsKey(videoInfo.videoID, videoInfo.service));
redis.delAsync(skipSegmentsHashKey(videoInfo.hashedVideoID, videoInfo.service));
}
}