Web Cache

Updated: July 15, 2026
By Willya Randika

Caching in hosting means storing expensive work so the next request is faster and cheaper on resources. Without cache, every visit may force PHP and MySQL to redo the same computation — from post queries to building full HTML.

Cache is not one magic switch. People often mix layers: browser cache, page cache, object cache, OPcache, and CDN edge cache. Knowing which layer is active prevents the “I cleared cache but it is still stale” loop.

A Simple Analogy

Imagine a kitchen that cooks every order from scratch. Cache is like keeping popular dishes ready. The next customer is served faster, and the stove (CPU) is not always on. If the menu changes but yesterday’s dish stays on the counter, guests get stale food — stale content.

Common Cache Layers

LayerWhat it storesExamples
BrowserStatic assets on the deviceCSS, images, fonts
Page cacheFinished HTMLWordPress cache plugins, LiteSpeed Cache
Object cacheQuery/object resultsRedis, Memcached
OPcachePHP bytecodeBuilt-in PHP extension
CDNCopies at the edgeCloudflare, Bunny

Benefits and Trade-offs

Main benefits: better TTFB, lower entry process pressure, and more headroom during traffic spikes. Trade-offs: stale content if purge fails; carts, checkout, and logged-in dashboards usually must be excluded from full page cache. A bad config can even cache a private page for the wrong user — a serious risk.

What to Watch For

  • Avoid stacking plugin cache + CDN + server cache without clear rules
  • Always test cart, checkout, and account areas after enabling cache
  • Purge after deploys, theme changes, or important content updates
  • Cache does not fix catastrophic slow queries by itself
  • Watch hit rate when panel or plugin tooling exposes it

FAQ

Is cache the same as a CDN?

CDNs often include edge caching, but origin caches can exist without any CDN at all.

Why do visitors still see old content?

Page cache or CDN was not purged. Clear the plugin cache, then purge the edge if you use Cloudflare.

Can every page be cached?

No. Per-user dynamic pages are usually excluded so data does not leak across sessions.

Can cache cause Error 508?

Healthy cache reduces 508 pressure. Conflicting plugins or bad rules can add load instead of removing it.

Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.