Page Cache
PerformancePage Cache is a performance technique that stores a fully rendered version of a web page so future requests can be served without re-running application code or database queries. By returning cached HTML (and sometimes headers) from memory or disk, it reduces server load and improves time to first byte. Page caching can be handled by the application, a plugin, the web server, or a reverse proxy.
How It Works
When a visitor requests a page, a dynamic site (for example, a CMS) typically executes server-side code, queries a database, and then renders HTML. With page caching enabled, the first request generates the page normally, but the resulting output is saved as a cache entry keyed by factors such as URL, query string, device type, language, and sometimes cookies. Subsequent requests can be served by returning that stored HTML directly, bypassing most of the application stack.
Caches must decide when to refresh content. Common strategies include time-based expiration (TTL), manual purges, and event-based invalidation (for example, clearing cache when a post is updated). Correct configuration also accounts for personalization and sessions: pages that vary per user (shopping carts, account pages) are usually excluded or cached with careful variation rules. Page cache can live at multiple layers, including the application, a web server cache, or a reverse proxy in front of the origin server.
Why It Matters for Web Hosting
Page cache directly affects how much CPU and database capacity your hosting plan needs. Strong caching can let a smaller plan handle more traffic, while weak or misconfigured caching can force upgrades due to high PHP or database usage. When comparing hosting options, look for support for server-level caching, reverse proxy capabilities, cache purge controls, and compatibility with your CMS and plugins, especially if your site mixes public pages with logged-in or personalized content.
Common Use Cases
- Caching public blog posts and marketing pages to reduce PHP and database load
- Improving performance for CMS-driven sites like WordPress, Drupal, or Joomla
- Handling traffic spikes from campaigns or social media without scaling immediately
- Reducing time to first byte for visitors by serving pre-rendered HTML quickly
- Offloading work from the origin server using a reverse proxy cache in front of the application
Page Cache vs Object Cache
Page cache stores the final rendered page output (usually HTML) and can bypass application execution for cache hits, making it ideal for mostly static, public pages. Object cache stores reusable pieces of data (such as database query results or computed objects) to speed up dynamic page generation; the application still runs, but does less work. Many sites use both: page cache for anonymous visitors and object cache to accelerate logged-in or frequently changing pages.