Caching: A trip down the rabbit hole
summary
Shows precise fixes and tools: use Django’s last-modified and etag decorators to return 304s instead of re-sending megabyte payloads, run collectstatic with cached staticfiles storage so filenames embed an md5 and can be cached for decades, put a fast reverse proxy like Varnish in front for sudden traffic spikes, back cached views with memcached/Redis and optionally use the ETag-as-cache-key trick or async refresh (Celery) so heavy responses are served from cache not recomputed.
AI-written summary · about
chapters (12)
- 0:00Caching: A trip down the rabbit hole
- 15:15What is an 'Etag?
- 16:04What you get for free
- 17:17Building your own Etag function
- 20:56The Expires: Header
- 22:16The Cache-control: header
- 26:52The right way to handle static files
- 29:46Conclusions for web browser caching
- 30:52Web-caching proxies
- 36:36Cool stuff you can do with varnish
- 41:40Use the Etag as the caching key
- 43:23Lessons learned
related talks
35mCaching everywhere
25mCaching strategies on https://dev.to
17mCache me if you can: Boosting performance with Data Caching in Python
05mLightning Talk: HTTP Caching in Python
20mE-Commerce with Django at Scale...
37mPerformant Django
47mCaching strategies on https://dev.to
43mCache Me Outside - Caching Methodologies & Architectures
