Skip to content

WordPress page cache vs object cache vs browser cache: when each

The three WordPress cache layers, what each does, when each pays off, and why most performance problems come from picking the wrong one for the symptom you have.

A WordPress site has at least three cache layers and most of the confusion in performance tuning comes from treating them as one thing. A team enables page cache and assumes object cache is no longer needed. Another team adds object cache and is surprised that anonymous visitors still see slow first paints. A third team configures browser cache headers and wonders why repeat visitors get the new CSS file but not the new HTML. Each layer caches a different thing for a different audience.

What’s happening

  • Page cache stores the fully rendered HTML response for a URL. WordPress generates the page once, the cache layer (Nginx FastCGI, Varnish, Cloudflare, WP Rocket, WP Super Cache) serves it from disk or memory on subsequent requests. Benefit: skips PHP and MySQL entirely for cacheable URLs. Audience: anonymous visitors.
  • Object cache stores the result of individual database queries, transients, and computed values inside the WordPress runtime. Benefit: speeds up PHP execution for any request that hits the same query patterns. Audience: logged-in users, admin, AJAX requests, and cache misses on the page cache.
  • Browser cache uses HTTP response headers (Cache-Control, Expires, ETag) to tell the visitor’s browser to store static assets locally. Benefit: skips the network entirely on repeat visits for CSS, JS, images, fonts. Audience: repeat visitors.

The layers stack. A repeat anonymous visitor hits browser cache for assets, page cache for HTML, and never touches PHP or the database. A logged-in admin saving a post skips page cache (correctly), hits object cache for transients and metadata, and uses browser cache for the editor’s own JS bundles.

How to verify

Identify which layer is doing what:

# Browser cache (static assets)
curl -sI https://www.example.com/wp-content/uploads/2026/logo.png | grep -iE 'cache-control|expires|etag'

# Page cache (HTML)
curl -sI https://www.example.com/ | grep -iE 'cache-control|x-cache|x-fastcgi-cache|cf-cache-status'
curl -sI https://www.example.com/ | grep -iE 'cache-control|x-cache|x-fastcgi-cache|cf-cache-status'

# Object cache
wp shell <<< 'var_dump(wp_using_ext_object_cache());'

A healthy WordPress site shows cache-control: public, max-age=31536000 for static assets, x-cache: HIT or equivalent on the second curl to a cacheable URL, and an external object cache active.

The fix

Pick the layer by the symptom:

  1. TTFB is high on anonymous traffic: page cache is missing or not serving. Confirm the cache plugin is enabled, the URL is not excluded (no query string, no admin path, no login cookie), and a second request returns from cache.
  2. Admin or logged-in pages are slow: page cache cannot help. Enable object cache (Redis preferred). LCP improvements for admin will come from database query time and PHP CPU time.
  3. Repeat visitors download CSS or JS on every page: browser cache headers are missing or set to no-cache. Configure Cache-Control: public, max-age=31536000, immutable for fingerprinted assets and max-age=3600 for non-fingerprinted assets.
  4. WooCommerce cart updates take a second: page cache is not the layer to fix. Object cache speeds up product lookups; AJAX endpoints need their own bypass. Browser cache plays no role here.
  5. A deploy goes out and visitors see old CSS: browser cache is doing exactly what it should. Use fingerprinted asset URLs (/wp-content/themes/site/style.abc123.css) so a content change becomes a new URL that bypasses browser cache.

Configure all three layers, but match the layer to the symptom you actually have. Adding more page cache will not fix slow admin. Adding more object cache will not fix slow anonymous LCP if the page cache is missing.

Stack Harbor configures and audits all three WordPress cache layers as part of enterprise WordPress support. If you are not sure which layer is responsible for a given symptom, book a 30-minute review.