Two Caches, Two Different Problems
Edge caching and object caching are both described as “caching” in WordPress performance discussions, but they solve completely different problems. Edge caching operates at the CDN layer and eliminates the need for the browser to reach your server at all. Object caching operates at the server layer and eliminates redundant database queries within a single PHP request. Understanding the difference determines which bottleneck you are solving.
Edge Caching: What It Does
Edge caching stores fully assembled HTTP responses (HTML, CSS, JavaScript, images) at CDN edge nodes globally. When a visitor requests a page, the CDN checks its edge cache. On a hit, it returns the cached response immediately without contacting your WordPress server — serving content from a node potentially 10–30ms away rather than 150–300ms from your origin.
- Accelerates: Static assets, full HTML for anonymous visitors, API responses that are not user-specific
- Cannot solve: Dynamic pages (cart, checkout, account), logged-in user content, slow database queries on cache misses
Object Caching: What It Does
Object caching stores results of expensive operations (database queries, computed PHP values, external API responses) in a fast in-memory store — typically Redis. When WordPress needs data, it first checks the object cache. On a hit, it retrieves from memory in under 1ms rather than executing a database query taking 5–50ms.
- Accelerates: Database queries (get_option, WP_Query, user meta), WooCommerce session data, dynamic pages that cannot be full-page cached
- Cannot solve: Geographic latency, PHP rendering overhead, unique queries that never repeat
Performance Impact Comparison
| Metric | Edge Caching Impact | Object Caching Impact |
|---|---|---|
| TTFB (anonymous page) | Dramatic (50ms vs 300ms+) | Moderate (100ms vs 200ms) |
| TTFB (logged-in user) | None (bypassed) | Significant |
| Dynamic page performance | None | Significant |
| Database server load | Reduces by cache hit rate % | Reduces queries within each request |
Recommended Configuration for WooCommerce
Use both layers: Edge layer (Cloudflare APO) serves all anonymous page views from the CDN, eliminating origin load for 80–95% of traffic. Object cache (Redis) accelerates all cache misses and dynamic pages (cart, checkout, account) that cannot be served from the edge. Server full-page cache (WP Rocket, Nginx FastCGI) catches requests that bypass the CDN but hit the origin.
# wp-config.php — Redis object cache
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', 6379);
define('WP_REDIS_MAXTTL', 3600);
define('WP_CACHE', true);
FAQ
Do I need both edge caching and object caching?
For most WooCommerce stores: yes. Edge caching serves anonymous traffic from the CDN (your biggest gain on TTFB). Object caching accelerates dynamic pages and logged-in sessions. They address different bottlenecks and gains are additive, not overlapping.