A client came to us last year with a WooCommerce store that was bleeding customers. Page load times hovered around six seconds. The server was powerful, the hosting was solid, and yet every product page felt like it was loading through wet concrete. We dug into the setup and found the culprit almost immediately: no object cache. Once we dropped Redis in and flipped the switch, load times fell by more than half. That single change did more for their conversion rate than three months of design tweaks.
Quick answer: Object cache in WordPress stores reusable database query results in memory so WordPress doesn’t have to run the same queries over and over. It’s one of the fastest, most cost-effective performance wins available to any WordPress site, and most sites aren’t using it.
Key Takeaways
- Object cache in WordPress stores database query results in memory, eliminating redundant queries and dramatically reducing page load times — sometimes by more than half.
- WordPress’s built-in object cache only lasts for a single page request; adding a persistent backend like Redis makes cached data available across all users and requests.
- Enabling a persistent object cache benefits logged-in users too — making it essential for WooCommerce stores, membership sites, and admin-heavy workflows where full-page caching is bypassed.
- Fewer database queries per page load directly improves Time to First Byte (TTFB), a confirmed Google ranking signal, giving object caching both a speed and SEO advantage.
- Setting up object cache in WordPress takes just three steps: install Redis or Memcached on your server, connect it via a drop-in plugin like Redis Object Cache, and verify the connection is active.
- For most WordPress sites, Redis is the recommended object cache backend — it supports richer data structures, disk persistence, and has the broadest plugin and documentation support.
What Is an Object Cache in WordPress?
Object cache in WordPress is a system that stores the results of database queries in fast, temporary memory so they can be retrieved instantly on the next request.
Here is why that matters. Every time a visitor loads a WordPress page, PHP asks the database dozens of questions: What’s the site title? Who is this user? What are the menu items? What widgets are active? With a standard setup, WordPress answers every one of those questions from scratch on every page load. That’s a lot of round trips to the database, and round trips take time.
The object cache short-circuits that process. Instead of hitting the database again, WordPress checks the cache first. If the answer is already stored, it pulls it from memory in microseconds.
WordPress ships with a built-in object cache, but it only lives for a single page request. Once that request ends, the cache is wiped. You can read more about how cache in WordPress works at a foundational level if you want to go deeper on the topic.
How WordPress Object Caching Works
WordPress uses a class called WP_Object_Cache to store data in memory during a page request. Plugins and themes can call wp_cache_set(), wp_cache_get(), and wp_cache_delete() to read and write to this cache. This is all baked into WordPress core.
The problem is what happens at the end of the request: everything disappears. The next request starts cold, the database gets hit again, and the whole cycle repeats.
A persistent object cache backend changes that. It connects WordPress to an external in-memory store, like Redis or Memcached, that lives outside of any single PHP process. Data written to the cache survives between requests. The WordPress cache layer then becomes genuinely useful across hundreds or thousands of concurrent visitors.
Developers on Stack Overflow frequently point out that for database-heavy sites, like WooCommerce stores or membership platforms, adding a persistent cache backend is one of the highest-leverage changes you can make without touching the application code itself.
Persistent vs. Non-Persistent Object Cache
Non-persistent (default): Lives only for the duration of one page request. It prevents duplicate queries within a single load, but offers no benefit across requests.
Persistent: Connects to an external store (Redis or Memcached). Cache data survives across requests, across users, and across server processes.
Here is what that means in practice. On a site with 500 visitors per hour, a non-persistent cache saves queries within each of those 500 individual requests. A persistent cache saves queries across all 500 requests by serving pre-stored results to every visitor hitting the same data. The scale difference is enormous.
Key Benefits of Enabling Object Cache on Your WordPress Site
Enabling object cache in WordPress delivers benefits that compound the larger and busier your site gets.
Fewer database queries per page load. WordPress sites with active plugins, complex menus, or dynamic content can generate 50 to 100+ database queries per page. A persistent cache cuts that number dramatically by serving stored results.
Faster time to first byte (TTFB). When the database is doing less work, PHP gets its data faster, and the server starts sending HTML to the browser sooner. TTFB is a direct Google ranking signal, so this isn’t just about user experience.
Lower server load. Fewer database queries means less CPU and memory pressure on the server. For shared hosting or smaller VPS setups, this headroom can be the difference between a site that stays up under traffic spikes and one that crashes.
Better performance for logged-in users. Page caching is typically bypassed for logged-in users. Object cache still works for them. WooCommerce checkout flows, membership portals, and admin-heavy workflows all benefit, even when full-page caching is off.
Scales without proportional cost. As traffic grows, database load grows with it, unless you have a cache absorbing repeat queries. Object cache lets you handle more visitors on the same server hardware.
You’ll notice the biggest gains on sites that run WooCommerce, advanced custom fields, or complex query-heavy plugins. If you want to see how object caching fits into a broader speed setup, our guide to LiteSpeed Cache settings with QUIC.cloud walks through the full stack, including where Redis fits in alongside page caching and Core Web Vitals improvements.
How to Set Up Object Cache in WordPress
Setting up object cache in WordPress takes three steps: install a backend store, install a WordPress drop-in, and verify it’s running.
Step 1: Install your backend store. Redis or Memcached must be installed on your server. Many managed WordPress hosts, including those running LiteSpeed, include Redis as a one-click add-on. If you’re on a VPS, your host’s documentation or the AWS blog has solid guides on provisioning Redis for PHP environments.
Step 2: Install a WordPress plugin to connect the two. Plugins like Redis Object Cache (by Till Krüss) or W3 Total Cache install the required object-cache.php drop-in file into your wp-content folder. This file overrides WordPress’s default cache class and routes all cache calls to the external backend. The drop-in is what makes the connection persistent.
Step 3: Verify the connection. In your WordPress admin, the Redis Object Cache plugin shows a clear status indicator: connected or not. If you’re on a LiteSpeed server, the LiteSpeed Cache plugin setup guide covers enabling the object cache tab directly inside LSCache, which removes the need for a separate plugin entirely.
You can also confirm caching is working by checking your server’s Redis CLI with redis-cli ping or info stats to see active connections and cache hits growing in real time.
Choosing a Backend: Redis vs. Memcached
Both Redis and Memcached are fast, in-memory stores used as object cache backends. Here is how they differ in practice.
Redis stores data in a richer set of structures (strings, lists, hashes, sets). It can persist data to disk, which means the cache survives a server restart. It supports clustering. Most WordPress-specific plugins and documentation, including the source code hosted on GitHub, favor Redis. We recommend Redis for almost every WordPress setup.
Memcached is simpler and slightly faster at pure key-value reads. It doesn’t persist to disk and doesn’t support complex data types. It’s a good fit for high-read, low-complexity environments where simplicity is preferred over features.
For most WordPress sites, including WooCommerce stores, membership sites, or any site running on LiteSpeed, Redis is the right call. It is better documented, better supported by WordPress plugins, and more forgiving in production environments.
If you want to go plugin-free and configure object caching at the server level, our WordPress caching without a plugin guide shows exactly how to do it with .htaccess and PHP-level Redis configuration.
Also worth noting: if you’re using WP Super Cache today, our breakdown of WordPress WP Super Cache explains how page caching and object caching serve different functions and why you likely need both.
Conclusion
Object cache in WordPress is not a luxury feature for enterprise sites. It’s a practical, low-risk configuration change that makes your database work smarter, your pages load faster, and your server sweat less.
Start small. If your host offers Redis, enable it. Install the Redis Object Cache plugin, connect it, and watch your query count drop. For teams already running LiteSpeed, our LiteSpeed Cache and why to use it guide covers exactly where object cache fits into your overall speed stack.
If you’d rather have us handle the setup, configuration, and testing, we’re happy to take it off your plate. Book a free consult with us at Zuleika LLC and we’ll map out the right caching architecture for your site.
Frequently Asked Questions About Object Cache in WordPress
What is object cache in WordPress and why does it matter?
Object cache in WordPress stores the results of database queries in fast, temporary memory so WordPress doesn’t repeat the same queries on every page load. This reduces server strain, improves time to first byte (TTFB), and speeds up page delivery — making it one of the highest-impact, lowest-risk performance upgrades available.
What’s the difference between persistent and non-persistent object cache in WordPress?
The default non-persistent object cache only lasts for a single page request — once the request ends, cached data is wiped. A persistent object cache, powered by Redis or Memcached, survives across multiple requests and users, dramatically reducing database load on busy sites like WooCommerce stores or membership platforms.
How do I set up object cache in WordPress?
Setting up WordPress object cache takes three steps: install a backend store like Redis on your server, install a connector plugin such as Redis Object Cache by Till Krüss to add the required object-cache.php drop-in, then verify the connection via your WordPress admin dashboard or Redis CLI using the redis-cli ping command.
Should I use Redis or Memcached as my WordPress object cache backend?
Redis is the recommended choice for most WordPress sites. It supports richer data structures, can persist cache data to disk so it survives server restarts, and has broader plugin and documentation support. Memcached is slightly faster for pure key-value reads but lacks persistence and complex data type support, making Redis the safer, more flexible option.
Does object cache in WordPress help logged-in users and WooCommerce customers?
Yes — this is one of object cache’s biggest advantages. Full-page caching is typically bypassed for logged-in users, but object cache continues working for them. WooCommerce checkout flows, membership portals, and admin-heavy workflows all benefit from reduced database queries, even when page-level caching is disabled.
Does enabling object cache improve Google rankings?
Indirectly, yes. Object cache reduces Time to First Byte (TTFB), which is a confirmed Google ranking signal tied to Core Web Vitals. Faster TTFB means the server starts delivering HTML sooner, improving Largest Contentful Paint (LCP) scores. Combined with page caching, enabling a persistent object cache backend is a measurable SEO performance win.
Some of the links shared in this post are affiliate links. If you click on the link & make any purchase, we will receive an affiliate commission at no extra cost of you.
We improve our products and advertising by using Microsoft Clarity to see how you use our website. By using our site, you agree that we and Microsoft can collect and use this data. Our privacy policy has more details.