โ Cloudflare & Edge Computing learning pathCloudflare & Edge Computing ยท Module 3 of 10
CDN and caching
Cloudflare caches files at the edge so the origin does less work.
๐ Key ideas
- Static files (images, CSS, JS) are cached by default.
- HTML is not cached by default unless you add a cache rule.
- Cache-Control headers from your origin guide caching.
- Purge cache after a deploy, by URL or everything.
- cf-cache-status header shows HIT, MISS, EXPIRED or BYPASS.
๐ก Real-life example: Like a local shop stocking popular items so customers do not wait for delivery from the factory.
Cache hitServed from the edge cache
PurgeRemove cached copies
Cache-ControlHeader with caching instructions
cf-cache-statusHeader showing cache result