Page cache: what it actually does and when to turn it off
Every visit to a WordPress without cache runs PHP and queries the database. The cache keeps the finished page. You almost always want it on; sometimes not.
Zygore team · · 4 min read
When someone opens a WordPress page, the server runs PHP, PHP asks the database, builds the HTML and sends it. At ten visits a minute it doesn't matter. At a thousand, it does: each one repeats the same work to produce the same page.
What the cache does
The page cache keeps the HTML generated the first time and serves it directly to the next visits, without PHP or database. At Zygore, OpenLiteSpeed does this with its cache module and, inside WordPress, the LiteSpeed Cache plugin, which comes enabled when the site is created. When you publish or edit something, the plugin invalidates what changed and the page is regenerated on the next visit.
What the cache knows not to keep
Some pages differ per visitor: the cart, checkout, “my account”, the WordPress dashboard. LiteSpeed Cache excludes them by default, and you can exclude more paths if your site has them. For a logged-in user, it doesn't cache.
When to turn it off
Almost never. The exception: something on the site looks wrong or stale and you suspect the cache. Then, from Speed in the panel, you switch it off, check whether the problem goes away and, if so, find the right exclusion instead of leaving it off. With the cache off, every visit runs PHP again: it's what a visitor notices most and what loads the server most.
And OPcache
It's another cache, at another level: it keeps compiled PHP code so it isn't re-read on every visit. It's on for every PHP version on the server and you see it in the panel. You don't need to touch it.