g↗G-W / CDN{CDN: WEB; ClIP: 216.73.216.54}
G-W CDN / 04

The right policy for every resource.

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.

01

Cache according to content

ResourceExample policyCondition
/assets/app.hash.jsmax-age=31536000, immutableURL changes with content
Live media playlistmax-age=0, s-maxage=1Example; align with update cadence
VOD playlistmax-age=3600Only after publication is complete
Segments .ts / .m4smax-age=86400Unique URL, unchanged bytes
02

HLS: Live / VOD

LIVE

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.

VOD

The content is complete.

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.

03

Example origin headers

VERSIONED STATIC ASSET
Cache-Control: public, max-age=31536000, immutable
Content-Type: application/javascript
LIVE MEDIA PLAYLIST / EXAMPLE
Cache-Control: public, max-age=0, s-maxage=1
Content-Type: application/vnd.apple.mpegurl

s-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.

04

Updates and the cache key

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.