Discussions
Cache TTL strategy for media objects that expire after 24 hours?
I'm delivering short-lived media objects (they are gone from origin after 24 hours) and trying to work out a sane multi-CDN cache policy for them.
The objects are immutable while they live, but origin starts returning 404 the moment the window closes. Right now I use s-maxage=3600 with stale-while-revalidate, which means a slice of requests near the end of the window still lands on a dead origin.
For context, this is for TikViewer, a client-side story viewer, so there is no auth layer in front of the media - every request is anonymous and fully cacheable.
Two questions: (1) does Mlytics expose purge by tag or by path prefix across the whole CDN pool, or is scheduled purge-by-URL the only route when I already know an object's expiry time? (2) is negative caching (caching the 404) configurable per path, so the dead-origin tail does not turn into origin load?
