Understanding the Different Types of Caching (Especially for Scaling CMS Sites)
If you’ve ever wondered what people mean when they talk about “page cache,” “object cache,” or “CDN cache,” this post is for you. These are the three main caching layers that make a massive difference when scaling WordPress, WooCommerce, or any other CMS.
What is Page Caching?
Page caching (also called full-page caching or HTML caching) is exactly what it sounds like: the entire rendered HTML page is saved as a static file.
With a truly static site (plain HTML + CSS + JS), there’s no need for page caching because every file is already static.
But with a CMS like WordPress, every request normally triggers PHP → theme → plugins → database queries → HTML output. That process eats CPU and takes time.
Full-page caching shortcuts all of that. The first visitor triggers the full PHP+MySQL process, the resulting HTML is saved, and every visitor after that gets served the pre-generated static HTML instantly — no PHP, no database queries, almost zero CPU.
Result: 10–100× lower server load and dramatically faster page loads.
What is Object Caching?
Object caching stores the results of expensive database queries (or any slow computation) in fast memory (usually Redis or Memcached).
Think of it as a super-fast middleman between your PHP code and the database.
Example with WordPress:
- WordPress needs the list of published posts → it asks MySQL.
- First request: MySQL does the work, returns the data, object cache saves it in RAM.
- Next 10 000 requests: object cache instantly returns the same data from memory → MySQL sleeps peacefully.
Object cache is smart — it automatically invalidates itself when data changes (e.g., you publish a new post).
Why you still need it even with full-page caching:
- Logged-in users (including the WordPress dashboard, WooCommerce account pages, etc.) can’t be fully cached for everyone.
- Those pages still hit PHP and MySQL → object cache makes them tolerable instead of painfully slow.
Object cache + full-page cache together is the classic high-traffic combo.
What is CDN Caching?
A CDN (Content Delivery Network) copies your static assets (CSS, JS, images, fonts) — and optionally your full HTML pages — to “PoP” servers all over the world.
Without a CDN: a visitor in Japan downloads everything from your origin server in, say, Brazil → high latency.
With a CDN:
- Static files are served from the closest PoP (often < 30 ms away).
- If you also enable full-page caching on the CDN, the entire HTML page is served from that nearby PoP too → the origin server is never touched for cached pages.
This is why some sites load instantly from anywhere on the planet.
Real-World Example: WordPress Traffic Flow
No caching at all
Visitor → Web server → PHP → dozens of plugin files → MySQL queries → HTML → visitor
→ High CPU, slow TTFB, easily hits resource limits.
With full-page caching only
First visitor: same slow path as above (but the HTML is saved).
Next 10 000 visitors: Web server instantly serves the pre-built HTML → almost zero CPU.
With object caching only
Every request still runs PHP + plugins, but database queries are answered from RAM instead of disk → faster than no cache, but still heavy.
With full-page cache + object cache
- Anonymous visitors → static HTML (super fast, almost no load)
- Logged-in users → PHP runs, but object cache makes DB queries instant → manageable load
Add CDN with full-page caching on top
Even the static HTML is now served from edge locations worldwide. Your origin server can basically take a nap until something actually needs PHP (e.g., form submissions, cache invalidation).
Conclusion
Here’s the hierarchy from most impactful to least (for most CMS sites):
- Full-page caching on the CDN → fastest for visitors, scales to millions of hits with almost zero origin load.
- Full-page caching on the origin → still massive win if you can’t cache on the CDN.
- Object caching (Redis/Memcached) → mandatory for logged-in users, WooCommerce, dashboards, etc.
- Everything else (OPcache, browser cache, etc.) → nice to have, usually enabled by default.
If you only do one thing: enable proper full-page caching (and push it to your CDN if possible).
If you have logged-in traffic or a shop: add Redis/Memcached object caching.
That’s it — the three caching layers that power basically every high-traffic WordPress site on the planet.
Hope this cleared things up! If anything is still confusing, drop a comment and I’ll explain further.
If you enjoyed this post, feel free to share it or subscribe to The Self Hosting Art. Thanks for reading! 😊