WordPress asks the database many questions on every request: options, posts, terms, user data. An object cache keeps the answers in fast memory so the next request does not have to ask again. It is one of the most effective speed-ups for dynamic sites, such as WooCommerce stores and membership sites, where full-page caching cannot help much.
Page cache vs object cache
| Page cache | Object cache | |
|---|---|---|
| Stores | The finished HTML of a page | Results of database queries and computed data |
| Helps most with | Public pages that are the same for everyone | Logged-in users, carts, search and admin screens |
| Typical tools | Host cache, caching plugins | Redis or Memcached with a WordPress drop-in |
They work together. Use a page cache for public pages and an object cache for everything dynamic.
Redis vs Memcached
| Redis | Memcached | |
|---|---|---|
| Data types | Strings plus lists, sets, hashes and more | Simple key-value strings |
| Persistence | Can save data to disk so the cache survives restarts | In memory only |
| WordPress support | Widely supported by hosts and plugins | Supported, somewhat less common on managed hosts |
| Best for | Most WordPress sites, especially stores | Very simple, high-throughput caching |

For most WordPress sites, Redis is the default choice because host and plugin support is broad and it handles the caching patterns WordPress uses well. Memcached remains a solid option if your host offers it and you prefer its simplicity.
How to set it up
- Check that your host offers it. Many managed hosts include Redis or provide it as an add-on. On your own server, install and secure Redis or Memcached.
- Install an object cache drop-in. A plugin or the host’s tool places an
object-cache.phpfile inwp-contentthat connects WordPress to the cache. - Add connection settings to
wp-config.phpif required, such as host, port and a unique key prefix so multiple sites do not mix data. - Enable it and flush the cache.
Check that it works
- Open Site Health in WordPress. It reports whether a persistent object cache is in use.
- Use Query Monitor to compare database query counts before and after.
- Use the plugin’s status screen to see hit and miss counts.
Pitfalls to avoid
- Stale data. If a plugin does not invalidate cached data correctly, you may see old content. Flush the cache after big changes.
- Shared prefixes. Two sites using the same prefix can read each other’s data. Always set a unique prefix.
- Memory limits. If the cache is too small, it evicts items constantly and helps little.
- Do not expect miracles on static pages. Object caching helps most on dynamic requests.
Final thoughts
If your site is a store, a membership site or has many logged-in users, object caching is among the highest-value changes you can make. Pick Redis unless your host steers you elsewhere, set a unique prefix, and verify it with Query Monitor.
Frequently asked questions
Do I need both a page cache and an object cache?
For dynamic sites, yes. They solve different problems. Blogs with mostly static pages may see little benefit from an object cache.
Can I use Redis on shared hosting?
Only if the host provides it. Many shared plans do not. Check with your provider before buying a plugin that requires it.



