The three caches WordPress operators argue about — LiteSpeed Cache (LSCache), Cloudflare APO, and Redis object cache — accelerate different parts of the request path. The arguments on forums treat them as alternatives, as if you have to pick one. In a real production WordPress install you almost always run more than one, because each one fixes a different bottleneck. This article is the decision framework: what each cache does, where it falls down, and how to compose them for the workload you actually have.
The mental model: LSCache and Cloudflare APO are both full-page caches — they store the rendered HTML and serve it without invoking PHP. Object cache (Redis) is below the page cache, accelerating the database queries that run when the page cache misses. You compare LSCache vs Cloudflare APO. You add Redis on top of either.
Three options at a glance
| Capability | LiteSpeed Cache plugin | Cloudflare APO | Redis Object Cache |
|---|---|---|---|
| What it caches | Full HTML at origin (LiteSpeed web server) | Full HTML at the edge (Cloudflare POPs) | DB query results, transients, options |
| Where it sits | Origin (between visitor and PHP) | Cloudflare edge (closer to user) | Inside the application, between PHP and MySQL |
| Granular invalidation | Per-post on save, per-term on category change, full-purge on theme switch | Automatic on post update via Cloudflare plugin | On wp_cache_delete() calls, transient expiry |
| Logged-in users | Bypasses cache (configurable per role) | Bypasses on session cookie presence | Accelerates regardless of login state |
| WooCommerce / ecommerce | ESI fragments for cart, account links | Bypasses cart and checkout via standard cookies | Accelerates cart and product DB queries |
| Dev experience | One plugin, ~100 settings, mostly sensible defaults | Set-and-forget toggle in Cloudflare dashboard | Drop-in or plugin; mostly transparent |
| Cost shape | Free plugin; requires LiteSpeed web server (Enterprise license or OpenLiteSpeed) | Cloudflare subscription line item; needs APO add-on | Free plugin; needs a managed or self-hosted Redis instance |
| Lock-in | Tied to LiteSpeed web server | Tied to Cloudflare | Tied to Redis (vendor-neutral) |
| Best on miss | Sub-ms HIT, full PHP render on MISS | Sub-100-ms HIT globally, origin round-trip on MISS | N/A — it absorbs DB load during MISS |
The columns are not interchangeable. LSCache and Cloudflare APO compete for the “full page cache” slot. Redis is orthogonal — it sits below both.
Option 1: LiteSpeed Cache (plugin)
LSCache is a WordPress plugin that talks to the LiteSpeed web server’s built-in cache module. The plugin tells LiteSpeed which responses to cache, what TTL to use, and which URLs to purge on a given hook. The actual cache storage lives in the web server, not in PHP — a HIT never invokes PHP at all.
When it wins.
- Hosted on LiteSpeed Enterprise (most modern cPanel hosts) or OpenLiteSpeed. The cache is native to the web server, so the integration is tight and the HIT path is the fastest available — typically well under a millisecond.
- WooCommerce and BuddyPress workloads where you need ESI fragments. ESI (Edge Side Includes) lets parts of a page be cached while other parts (cart contents, account menu) are rendered per-request inside the cached shell. This is hard to replicate on Cloudflare APO.
- Sites that need fine-grained purge control. The plugin emits purges on every post/page/term save, plugin update, theme change, and many other hooks. Custom purge rules are configurable per content type.
- Sites with high editorial activity and low staleness tolerance. LSCache purges happen at the origin server in milliseconds; the CDN above gets purged in parallel.
When it loses.
- You are on Apache or nginx without a LiteSpeed server. The plugin works in a degraded mode using a local file cache, which is much slower than the native LiteSpeed cache and not worth installing for that alone — use a different page cache plugin.
- You need global edge caching. LSCache is at the origin; users on the other side of the world still pay the round-trip. Pair LSCache with a CDN above (Cloudflare cache rules, BunnyCDN) for global reach.
- You have a multi-region setup with multiple WordPress instances. Each instance has its own LSCache; cross-instance purges need a glue layer you have to build.
The plugin defaults are good for most content sites. Turn on the cache, set a TTL between 5 minutes and a day depending on editorial cadence, exclude the obvious bypasses (admin, login, cart, account) and let it run. See LiteSpeed Cache for WordPress on cPanel — sensible defaults for the configuration recipe.
Option 2: Cloudflare APO
APO is Cloudflare’s automatic platform optimization product for WordPress. The bundle has three parts: a Cloudflare-side configuration that turns on full HTML caching at the edge, a Cloudflare WordPress plugin that issues automatic purges on post updates, and Workers KV as the storage layer so cached HTML is replicated to every Cloudflare POP within seconds of a write.
What APO actually does: when a visitor requests https://example.com/blog/post-name/, Cloudflare checks Workers KV for the cached HTML. If present (and the visitor is not logged in), serve from KV — sub-100-ms response time from anywhere in the world. If absent, Cloudflare fetches from the origin, stores the response in KV, returns to the user, and replicates to all POPs.
When it wins.
- Global audience on a content site (blog, magazine, documentation, marketing pages). The edge HTML cache delivers the same sub-100-ms response in Sydney that it does at the origin in Montreal.
- Origin compute is constrained. APO offloads the rendering to whenever the post was first viewed; subsequent reads cost nothing at origin.
- You want set-and-forget. The Cloudflare dashboard toggle plus the WordPress plugin is roughly an hour of work. Sensible defaults out of the box.
When it loses.
- WooCommerce stores. APO bypasses the cache when WooCommerce session cookies are present, which is essentially every page once a cart exists. The cache only helps anonymous browsing of product pages. The actual revenue path (cart, checkout, account) is uncached.
- Membership sites, BuddyPress, bbPress. Same problem — logged-in visitors bypass the cache, and the value proposition is in the personalized experience.
- High-frequency content updates. APO purges on post update, but the granularity is “this URL.” A taxonomy change that affects many URLs needs manual handling. LSCache, by contrast, knows about WordPress’s content graph natively.
- Workers KV adds a Cloudflare line item. The cost is small per site but it is a cost the team has to track.
The fall-down point that catches teams off guard: APO is a full-page cache. It does not accelerate the cases where you cannot cache the page (cart, account, search). For those, you need a layer below — which is where Redis comes in.
Option 3: Redis Object Cache
Redis Object Cache is a WordPress drop-in or plugin that replaces WordPress’s transient and object cache APIs with calls to a real Redis instance. The two implementations that matter: redis-cache by Till Krüss (free plugin, optional Pro tier) and Object Cache Pro (commercial, same author, ships as drop-in). Both wrap the WordPress wp_cache_* and set_transient / get_transient functions in Redis calls.
What this accelerates: anything WordPress already tries to cache in memory but loses between requests because the default object cache is per-request. Database queries cached by WP_Query. Option lookups cached by wp_options. Term and taxonomy lookups. Transient API calls (which without persistent object cache fall back to writing rows to wp_options, a known performance disaster on large sites). User meta. Plugin-cached values (Yoast SEO indexables, WooCommerce product visibility queries, Action Scheduler state).
What it does not accelerate: the full HTML render. If LSCache and APO both miss, PHP still runs every line of code on every request. Redis just makes that run faster by serving the DB queries from memory.
When it wins.
- WooCommerce. Cart pages, checkout, account pages — none of these can be page-cached, but they all hit
wp_optionsandwp_postmetarepeatedly. Object cache turns those queries into Redis lookups. - Large multisite networks. Network-wide option lookups become free.
- Sites with many active plugins that lean on transients (Yoast, WP Rocket, Action Scheduler). Without object cache these write to
wp_options, which becomes a bottleneck table. - Sites where the admin is slow. The WordPress admin is largely uncacheable at the page level; object cache makes the admin queries fast.
When it loses.
- Tiny sites with low traffic. The Redis service has an operational cost (monitoring, memory limits, connection pool) that a 12-visit-per-day site does not pay back.
- Shared hosts that do not support Redis. cPanel hosts vary; many include managed Redis, some do not. Check before relying on the plugin.
The standard install: pick redis-cache plugin or Object Cache Pro, point it at your Redis instance, and use WP_REDIS_DATABASE to give the site its own Redis database number so a flush in one environment does not affect others. Set WP_REDIS_MAXTTL to put a ceiling on cache entries, defaulting to 7 days is reasonable.
The reality: you almost always run more than one
The framing of “LSCache vs APO vs Redis” loses the point. On a serious production WordPress install, the cache stack looks like this:
- CDN / edge — Cloudflare. Static assets at minimum. APO on top if the audience is global and the workload is content-heavy. Or a different CDN with cache rules configured to mimic the same behavior.
- Page cache at origin — LSCache on LiteSpeed hosts, or W3 Total Cache / Cache Enabler / similar plugin on Apache/nginx. Granular per-post purges. Logged-in user bypass.
- Object cache — Redis. Always, on any site big enough to have plugins or WooCommerce.
- PHP execution cache — opcache enabled, PHP 8.1+ JIT enabled on the PHP-FPM config. Free, comes with PHP.
The four layers compound. Anonymous visitor on a cached page: served from Cloudflare APO in 50 ms, zero origin load. Anonymous visitor whose page is not yet at the edge: LSCache HIT at origin in 5 ms, Cloudflare caches the response for next time. Logged-in visitor adding to cart: LSCache misses (cookie bypass), PHP runs, but every WP query reads from Redis, response in 200 ms instead of 2 seconds. WooCommerce admin running a report: APO and LSCache both miss, PHP runs, but the heavy queries hit Redis, completes in 1 second instead of 30.
Decision matrix
| Workload | Edge | Page cache at origin | Object cache | Notes |
|---|---|---|---|---|
| Personal blog, low traffic | Cloudflare static-only | Optional (any) | Optional | Database is bored; one layer is enough |
| Publication / magazine, global audience | Cloudflare APO | LSCache or W3TC | Redis | APO is the win; origin cache is the safety net for APO MISS |
| Agency portfolio, moderate traffic | Cloudflare APO | LSCache | Redis | Same shape as publication |
| WooCommerce store, single region | Cloudflare static + page rules | LSCache with ESI | Redis (required) | APO underperforms on cart-heavy traffic; ESI matters |
| WooCommerce store, global | Cloudflare APO + bypass-on-cookie rules | LSCache with ESI | Redis (required) | Personalization is most of the value, page cache is partial |
| Membership site (BuddyPress, MemberPress) | Cloudflare for static | LSCache (mostly bypassed) | Redis (required) | Logged-in is the norm; object cache does the heavy lifting |
| Multisite network | Cloudflare APO | LSCache per site | Redis (required) | Each site needs its own page-cache discipline; Redis is shared |
| Headless WP (REST/GraphQL) | Cloudflare cache rules on /wp-json/* | Cache plugin emitting Cache-Tag | Redis | Page cache is irrelevant; edge JSON caching is the win |
The matrix is a starting point, not a prescription. Real workloads have specifics — a publication with a comments-heavy template behaves differently than one with a syndication-only template. Measure first.
Migration paths between cache stacks
The common transitions in practice.
Apache + W3 Total Cache → LiteSpeed + LSCache. Common when migrating from a generic cPanel host to a LiteSpeed-backed one. The W3 Total Cache configuration is mostly ignored on LiteSpeed; install LSCache, deactivate W3TC, configure LSCache defaults, test with a logged-out browser, watch the X-LiteSpeed-Cache header go from miss to hit. Object cache settings migrate cleanly if both used the same Redis backend.
LSCache + no edge cache → LSCache + Cloudflare APO. Add Cloudflare in front, enable APO, install the Cloudflare WordPress plugin. APO and LSCache do not conflict — APO caches at the edge, LSCache caches at origin for APO misses and for logged-in users that bypass APO. The one footgun: confirm LSCache’s “Cache Tag Prefix” setting is unique per site if multiple WordPress installs share a Cloudflare account.
APO → APO + Redis object cache. Add Redis (managed service or self-hosted), install the object cache plugin, point at Redis. No conflict with APO. The win is on uncached pages: admin, search, logged-in.
Redis Object Cache plugin → Object Cache Pro. Drop-in upgrade. Pro version has better cluster support, automatic memory management, and per-group flush. Mechanical migration: install via composer or upload, enable the drop-in, replace the free plugin. Drop-in lives at wp-content/object-cache.php.
Removing a layer. The hard direction. Removing the edge cache means traffic spikes to origin — pre-warm origin if APO has been doing the heavy lifting. Removing the page cache means PHP runs every request — make sure object cache is in place first. Removing object cache means wp_options becomes the bottleneck — run a wp_options cleanup before flipping.
Operational hazards
Multi-cache invalidation race. An editor saves a post. LSCache fires its purge, then the WordPress hook for Cloudflare APO purge fires. Both succeed eventually, but the race window — usually 1-5 seconds — is enough for a request to hit Cloudflare HIT (still serving the old version) → origin (LSCache already purged, fresh from PHP) → new version cached at edge. Result: some users see the new version, some see the old, depending on which POP they land on. The mitigation: accept short staleness windows on the edge cache, or wire the WordPress purge hook to fire APO and LSCache purges before responding to the save.
Cookie-based bypass leaks. LSCache and APO both bypass cache on the presence of certain cookies (wp-postpass_*, wordpress_logged_in_*, woocommerce_*, comment_author_*). A plugin or theme that sets a custom cookie for an anonymous user can cause every visitor with that cookie to bypass the cache, even though the response is identical to anonymous. Symptoms: cache hit rate drops to 5 %, origin load climbs. Audit cookies via curl -I against a few URLs, especially after plugin updates.
Cron-warmer infinite loops. A common pattern: a cron job hits every URL on the site to warm the cache. If the warmer uses a logged-in cookie (because the developer ran curl with their own session and copy-pasted), every warmer request bypasses cache and creates more PHP load instead of less. Always warm with explicit --no-cookies or a fresh session.
LSCache and Cloudflare cache-control header conflicts. LSCache sets Cache-Control: max-age=0, public on cached HTML by default — telling browsers not to cache but the CDN to cache. Cloudflare honors this. If you change LSCache’s headers without thinking about what Cloudflare reads, you can end up with no edge cache at all.
Redis memory pressure. Object cache with maxmemory-policy noeviction will throw errors when Redis is full. Set allkeys-lru if the Redis is dedicated to object cache. If the Redis also holds queue data, use volatile-lru and put a TTL on every cache entry.
Object Cache Pro license churn. Object Cache Pro requires a license; on multisite networks with many sites the license needs configuration per network. A lapsed license causes the drop-in to revert to a no-op, and database load spikes silently. Wire the license expiry to alerting.
For a managed approach, enterprise WordPress support covers the full stack — Cloudflare APO and edge rules, LSCache or alternative origin cache, Redis object cache, with senior engineers designing the topology and the support desk monitoring hit rates. For cPanel-hosted single sites, cPanel server administration operates the LSCache layer plus origin tuning. The PaaS-hosted variant lives under Cloud PaaS.
See also
- Multi-layer caching architecture — edge, page, object, database
- LiteSpeed Cache for WordPress on cPanel — sensible defaults
- LiteSpeed server-side cache: how LSCache works at the web server layer
- Cloudflare cache purge: URL, tag, hostname, prefix, or everything
- CDN cache rules — what to cache, what to pass, what to vary on
- Cache stampede mitigation