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

@@ -1,8 +1,8 @@
import { Service, VideoID, VideoIDHash } from "../types/segments.model";
import { Logger } from "../utils/logger";
export function skipSegmentsKey(videoID: VideoID): string {
return "segments-" + videoID;
export function skipSegmentsKey(videoID: VideoID, service: Service): string {
return "segments." + service + ".videoID." + videoID;
}
export function skipSegmentsHashKey(hashedVideoIDPrefix: VideoIDHash, service: Service): string {