Caching explained: LiteSpeed, page cache and object cache

TL;DR

Caching stores ready-made versions of your pages so the server does less work per visitor. Page caching is the biggest win, object caching helps complex pages, and browser and CDN caching speed repeat and distant visits. Purge the cache after changes.

Key takeaways

  • Caching saves ready-made pages so the server does less work per visit.
  • Page caching is the single biggest speed win, ideally at the server level.
  • Object caching helps dynamic and busy pages.
  • Browser and CDN caching speed up repeat and distant visitors.
  • Purge the cache after changes, and never cache booking widgets or logged-in views.

Caching is the single most effective way to make a WordPress site faster, yet it is often misunderstood. In short, caching saves a ready-made version of your pages so the server does less work for each visitor. This guide explains the main types of caching in plain language and how they make your site quick.

What caching does

Normally, every time someone visits a WordPress page, the server runs PHP and queries the database to build it from scratch. Caching stores the result so the next visitor gets the ready-made version instantly. The effect on speed is dramatic, which is why caching is central to good Core Web Vitals.

Page caching

Page caching saves the full HTML of a page and serves that to visitors, skipping most of the work. It is the biggest single win for a typical site. High performance servers using LiteSpeed can do this at the server level, which is faster and lighter than a plugin doing it in PHP. Good managed hosting usually has this configured already.

Object and database caching

Object caching stores the results of database queries in memory, so repeated queries are instant. This matters most for dynamic sites and busy stores. For a typical brochure or hotel site, page caching does most of the heavy lifting, but object caching helps on more complex pages and under load.

Browser and CDN caching

Browser caching tells a visitor’s browser to keep static files like images and stylesheets, so a returning visitor does not download them again. A content delivery network goes further, storing copies of your files in locations around the world, as covered in our guide to Cloudflare for business websites. Together they make repeat visits and distant visitors much faster.

Common gotchas

Caching is powerful but has a catch: a cached page can show stale content after you make a change. The fix is to clear or purge the cache after updates, which good setups do automatically for the affected pages. Be careful with dynamic elements like a booking widget or a logged-in view, which should not be cached. A sensible caching setup, maintained as part of your maintenance plan, gives you speed without surprises. Our hosting service ships with server level caching tuned for WordPress.

Frequently asked questions

What is the most important type of caching?

Page caching, which stores the full HTML of a page and serves it instantly. It is the single biggest speed win for a typical WordPress site, especially at the server level.

Why does my site show old content after an update?

A cached version is still being served. The fix is to clear or purge the cache after changes, which good setups do automatically for the affected pages.

Should everything on my site be cached?

No. Static pages benefit, but dynamic elements like a booking widget or a logged-in view should not be cached, or they will show incorrect information.