CDN Delivery, Cache Keys, and Content Lifecycle
Serve public immutable assets through a CDN with versioned paths and long cache lifetimes. Mutable resources need revalidation, shorter TTLs, or explicit purge workflows. Cache keys may include host, path, query parameters, and selected headers; unnecessary variation reduces hit ratio, while missing variation can serve the wrong representation.
Private media requires authorization-aware delivery. Signed cookies or URLs can grant temporary access, but revocation and expiration behavior must be understood. Avoid placing private user data in public cacheable URLs or logging sensitive query parameters.
Content lifecycle includes retention, legal deletion, derivative cleanup, orphan detection, and storage-tier transitions. Deleting the database record is not enough if thumbnails, transcoded variants, CDN caches, or backups remain. Define which copies are deleted immediately and which expire under a documented policy.
- Cache keys must represent every dimension that changes a response.
- Private delivery needs scoped authorization, not obscure URLs.
- Design deletion and retention across all media derivatives.