3 ms·
We use CloudFront at work. It works well for us. We do a couple things differently though: 1. Instead of trying to purge all old files and upload new ones, w
by bjt 14y ago
We use CloudFront at work. It works well for us. We do a couple things differently though:
1. Instead of trying to purge all old files and upload new ones, we use cache-busting hashes in our static file names. This solves the stale-cache problem even for browser caches, not just CDN edge servers. Luckily, Django makes it easy to do this (https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#django.contrib.staticfiles.storage.CachedStaticFilesStorage https://docs.djangoproject.com/en/dev/ref/contrib/staticfile...).
2. Where we care about gzipping (CSS and JS primarily), we use our own server for the origin instead of S3.