The playlist keeps moving.
A media playlist changes as the stream progresses. Keep its TTL aligned with segment duration and update cadence. A master playlist can use a different TTL. Avoid long caching of temporary segment 404 responses.
{CDN: WEB; ClIP: 216.73.216.54}Static assets, live and VOD: different lifetimes, one approach.
These are starting examples, not active service settings. Choose TTLs based on update frequency, origin behavior and player requirements.
| Resource | Example policy | Condition |
|---|---|---|
/assets/app.hash.js | max-age=31536000, immutable | URL changes with content |
| Live media playlist | max-age=0, s-maxage=1 | Example; align with update cadence |
| VOD playlist | max-age=3600 | Only after publication is complete |
| Segments .ts / .m4s | max-age=86400 | Unique URL, unchanged bytes |
A media playlist changes as the stream progresses. Keep its TTL aligned with segment duration and update cadence. A master playlist can use a different TTL. Avoid long caching of temporary segment 404 responses.
Completed playlists and segments can be cached longer. Use a new path or version when replacing video. Check initialization segments and Range requests when a stream uses byte ranges.
Cache-Control: public, max-age=31536000, immutable
Content-Type: application/javascriptCache-Control: public, max-age=0, s-maxage=1
Content-Type: application/vnd.apple.mpegurls-maxage controls shared-cache freshness; max-age applies to browsers absent other directives. Use private or no-store for personal data as required by the application. Do not automatically mark protected content public.
Prefer hashed filenames for static assets. When the URL stays the same, updates need TTL expiry, revalidation or a configured purge mechanism. Query parameters, Host and Vary may affect cache separation; never remove tokens from the key without reviewing authorization.