(videoPath: string)
| 90 | * orphaned entry. |
| 91 | */ |
| 92 | export function readKeyStat(videoPath: string): { mtimeMs: number; size: number } | null { |
| 93 | try { |
| 94 | const stat = statSync(videoPath); |
| 95 | return { mtimeMs: Math.floor(stat.mtimeMs), size: stat.size }; |
| 96 | } catch { |
| 97 | return null; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | function canonicalKeyBlob(input: CacheKeyInput): string { |
| 102 | const durationForKey = Number.isFinite(input.duration) ? input.duration : -1; |
no outgoing calls