The attachments domain (currently mdn.mozillademos.org) serves four types of requests:
/files like files/12984/web-font-example.png, which are user attachments. It is possible to replace a user attachment with a new file, and we can cache on the modification date.
@api files like @api/deki/files/3613/=hut.jpg, which redirect to a /files endpoint. These could be cached for a long time.
These are good candidates for a CDN. Unlike the static assets, we would want short cache times, so that if a file is removed or updated, it will take effect quickly. We could also use the CloudFront Invalidation API.
Cache headers for /files were improved in #578.
NOTE: notes above by @jwhitlock, my name shows as I converted it from a project card to an issue.
The attachments domain (currently mdn.mozillademos.org) serves four types of requests:
/files
like files/12984/web-font-example.png, which are user attachments. It is possible to replace a user attachment with a new file, and we can cache on the modification date.@api
files like @api/deki/files/3613/=hut.jpg, which redirect to a/files
endpoint. These could be cached for a long time.$samples
like /en-US/docs/Learn/CSS/Styling_text/Fundamentals$samples/Color, which are extracted from user-written wiki content. The content changes when the page is updated.These are good candidates for a CDN. Unlike the static assets, we would want short cache times, so that if a file is removed or updated, it will take effect quickly. We could also use the CloudFront Invalidation API.
Cache headers for
/files
were improved in #578.NOTE: notes above by @jwhitlock, my name shows as I converted it from a project card to an issue.