Cloud CDN
Also Known As
CloudFront
Fastly
Cloudflare
TL;DR
CloudFront, Fastly, Cloudflare — caching at edge PoPs worldwide reducing latency and origin load.
Explanation
CloudFront integrates with AWS; Fastly has instant global purge; Cloudflare adds WAF and DDoS. Dynamic PHP responses with Cache-Control: public, s-maxage=N are CDN-cacheable too.
Common Misconception
✗ CDN is only for static files — dynamic API responses with correct Cache-Control headers are also CDN-cacheable.
Why It Matters
A CDN is not just about speed — it is the first line of defence against DDoS attacks and traffic spikes, since edge nodes absorb traffic before it reaches your origin server. For PHP applications, offloading static assets to a CDN is the single highest-ROI performance improvement available, reducing server load, improving global latency, and often reducing hosting costs. The configuration mistake to avoid is caching responses that include user-specific content, which leaks one user's data to another.
Common Mistakes
- No Cache-Control header
- Caching authenticated responses
- Missing Vary: Accept-Encoding
- No tag-based purge strategy
Code Examples
✗ Vulnerable
return response()->json(Product::all()); // No cache headers
✓ Fixed
return response()->json($products)->header('Cache-Control','public, s-maxage=300, stale-while-revalidate=60');
References
Tags
🤝 Adopt this term
£79/year · your link shown here
Added
16 Mar 2026
Edited
23 Mar 2026
Views
23
🤖 AI Guestbook educational data only
|
|
Last 30 days
Agents 0
No pings yet today
No pings yesterday
Perplexity 6
Amazonbot 5
Google 4
Ahrefs 2
Unknown AI 2
SEMrush 1
Also referenced
How they use it
crawler 17
crawler_json 3
Related categories
⚡
DEV INTEL
Tools & Severity
🟡 Medium
⚙ Fix effort: Medium
⚡ Quick Fix
Use CloudFront or Cloudflare with origin shield to reduce origin hits — configure cache behaviours per path pattern: /api/* no-cache, /assets/* 1 year, /* pages short TTL
📦 Applies To
any
web
🔗 Prerequisites
🔍 Detection Hints
Single cache behaviour for all paths; API responses being cached; no cache invalidation on deploy; PHP serving high-traffic static assets directly
Auto-detectable:
✓ Yes
cloudfront
cloudflare
fastly
lighthouse
⚠ Related Problems
🤖 AI Agent
Confidence: Low
False Positives: Medium
✗ Manual fix
Fix: Medium
Context: File