Discussions
Cache strategy for sidecar WebVTT caption files that change unpredictably
We serve short-form video with sidecar WebVTT caption tracks instead of burning the text into the frames, and I am trying to settle on sane edge cache rules for the .vtt files. Segments are immutable with hashed filenames, so those are easy — long max-age and done. The caption tracks are the awkward part: same URL, regenerated whenever someone fixes a line, and 95% of the time never touched again after first publish. Right now I send no-cache on every .vtt, which feels wasteful. The three options I keep going back and forth on are a versioned query string with a long TTL, a short 60s TTL with stale-while-revalidate, or surrogate keys plus an explicit purge on edit. For context the tracks come out of https://facelessvideos.app/caption-generator and are plain WebVTT, nothing exotic. What do people here do for text sidecars that change infrequently but unpredictably?
