Object Cache
Quick Definition
The object cache is a system that stores database query results in memory so WordPress does not have to run the same queries on every page load. With Redis or Memcached, it persists across requests for a major speed boost.

What Is the Object Cache?
The object cache is WordPress's built-in mechanism for reducing database trips. Every time WordPress needs data — a post, a user, a setting, a menu — it runs a MySQL query. On a typical page load, WordPress might run 50–200 queries. The object cache stores the results of these queries in memory so they do not have to run again during the same request.
By default, WordPress's object cache is non-persistent. It lives in PHP memory and only lasts for the duration of a single page load. When the next visitor hits the page, the cache is empty and all queries run again. This still helps within a single request (the same query is not repeated twice), but the real performance gains come from making it persistent.
A persistent object cache stores data in a fast in-memory database like Redis or Memcached that survives between page loads. Instead of querying MySQL 150 times per page, WordPress checks Redis first — and since Redis responds in microseconds, your pages load significantly faster. This is especially impactful on dynamic sites, WooCommerce stores, and membership sites with logged-in users where full-page caching is less effective.
Developers interact with the object cache through four core functions:
wp_cache_set( $key, $data, $group, $expire )— Store datawp_cache_get( $key, $group )— Retrieve datawp_cache_delete( $key, $group )— Remove a specific itemwp_cache_flush()— Clear the entire cache
The object cache also powers transients. When a persistent object cache is active, transients are stored in Redis/Memcached instead of the wp_options table — making them much faster and keeping your database lean.
Object Cache in Practice
Most managed WordPress hosts (Kinsta, WP Engine, Cloudways, SiteGround) include Redis or Memcached as part of their hosting plans. You enable it with a plugin like Redis Object Cache (free, 200K+ installs) or your host's one-click toggle.
Redis and Memcached differ in one key way: Redis supports complex data structures (lists, sets, sorted sets) and data persistence to disk, making it the preferred choice for WordPress. Memcached is simpler and slightly faster for basic key-value lookups but cannot persist data if the server restarts.
The performance impact is measurable. Sites with persistent object caching typically see 30-50% lower Time to First Byte (TTFB) and significantly fewer slow MySQL queries — especially under traffic spikes where the database would otherwise become a bottleneck.
Why It Matters
If your WordPress site feels slow despite having page caching enabled, the database is likely the bottleneck — and the object cache is the solution. It is the single most impactful performance optimization for dynamic WordPress sites, WooCommerce stores, and any site with logged-in users. Understanding it helps you choose the right hosting plan and configure your speed optimization stack properly.