What Cache Means
Cache stores a reusable copy of data so the website can respond faster without repeating the same expensive work every time.
Where Cache Sits In The Stack
Cache can exist at many layers: browser cache, CDN cache, Nginx cache, object cache, page cache, database query cache and WordPress plugin cache.
How Cache Works
Instead of rebuilding the same page or asset on every request, the system stores a ready version. Future visitors may receive the cached version until it expires or gets cleared.
Why Cache Breaks Websites
Cache breaks websites when old pages remain visible after updates, logged-in content gets cached incorrectly, mobile and desktop versions mix, or cache files grow too large.
How To Think About Cache
Cache is a speed layer, not the source of truth. The source of truth is still the application, database and files. Cache should be clearable, measurable and documented.
Infrastructure Layer
Cache / CDN
Difficulty Level
Beginner
Core Concept
Cache stores reusable responses or data so the website can serve future requests faster.
System Role
It reduces repeated work across the application, database, web server, browser and CDN layers.
How It Works
The first request may generate content from WordPress and MySQL. A cache layer stores the result. Later requests can reuse the stored response instead of rebuilding it.
Connected Components
Browser cache, CDN, Nginx cache, WordPress cache plugin, object cache, database, PHP-FPM, MySQL, static assets.
Common Failure Points
Stale content, cached admin pages, mixed mobile layout, cache not purged after update, disk bloat, plugin conflicts, wrong cache rules for logged-in users.
Verification Method
Check response headers, clear cache safely, compare logged-in and logged-out views, inspect cache directory size and test important pages after updates.
Basic Commands
curl -I https://example.com;
du -sh /var/www/example.com/wp-content/cache;
grep -R "cache" /etc/nginx/sites-enabled/;
wp cache flush --allow-root