What Is Object Caching and Why It Matters for Your Website
- Performance and Optimisation
- Jason Carter
Object caching is a server-side performance technique that stores frequently accessed data in fast memory rather than repeatedly fetching it from your database. Whilst page caching saves entire HTML pages, object caching works at a more granular level, storing individual pieces of data your website uses repeatedly.
This guide covers how object caching works, when you actually need it, the difference between persistent and non-persistent caching and which UK hosting providers support it. This matters particularly for WordPress sites with high traffic, e-commerce shops or membership areas where users log in and see personalised content that can't be cached as static pages.
How Object Caching Actually Works Behind the Scenes
Object caching follows a straightforward four-step process. Your website needs a piece of data, such as a list of product categories. It checks the object cache first using a unique key. If found (a cache hit), the data returns instantly from memory in microseconds, bypassing the database entirely. If not found (a cache miss), the website queries the database, retrieves the data, processes it and stores a copy in the cache for next time.
Think of it like keeping frequently used ingredients on your kitchen counter rather than fetching them from the cellar every time you cook. The first time you need an ingredient, you walk to the cellar. After that, it stays within arm’s reach.
Cache hits return data in microseconds compared to milliseconds for database queries. Without object caching, your site queries the database every time someone views your navigation menu, even though it rarely changes. WordPress example: caching navigation menus, user profiles or widget content avoids repetitive database scans. In typical scenarios, WooCommerce cart pages can generate 32 or more database queries without caching. With object caching enabled, that number drops significantly because frequently accessed data like product details and cart contents are served from memory using Redis or similar systems.
The Key Difference Between Object Caching and Page Caching
Page caching stores entire HTML pages and serves them to visitors without running any PHP code or database queries. It works perfectly for static content that’s the same for all visitors, like blog posts. Object caching, by contrast, stores individual data objects such as query results, user sessions and shopping cart contents. This becomes essential for dynamic content that changes per user or updates frequently.
Logged-in WordPress users, WooCommerce customers and membership sites can’t rely solely on page caching because each user sees personalised content. The two techniques work together: page caching handles anonymous visitors viewing static pages whilst object caching speeds up dynamic elements and logged-in experiences. This relationship extends to other caching layers like browser caching, which stores static assets locally on visitors’ devices.
A WooCommerce shop might page-cache the homepage for visitors but use object caching to speed up the checkout process for customers. When someone adds items to their cart, object caching stores their cart data in memory so each page load doesn’t require fresh database queries to rebuild what they’re buying.
| Aspect | Page Caching | Object Caching |
|---|---|---|
| What it stores | Full HTML pages | Database query results, user sessions, data objects |
| When it’s used | Static content, same for all visitors | Dynamic content, personalised data, logged-in users |
| Who benefits | Anonymous visitors viewing blogs, brochure pages | Logged-in users, e-commerce customers, membership sites |
Understanding Persistent vs Non-Persistent Object Caching
WordPress includes basic object caching out of the box, but the default implementation is non-persistent. Understanding this distinction determines whether you’ll see meaningful performance gains or minimal impact.
Non-Persistent Caching
WordPress stores cached objects in PHP memory only for the duration of a single page load. Once the page finishes rendering, the cache clears. This means the same queries run again on the next page load, even for the same visitor. If a visitor loads your homepage then clicks to a product page, the cache is wiped and all queries run again. The underlying Linux server processes each request independently, so non-persistent caching offers minimal performance benefit. It helps within a single request but doesn’t reduce database load across requests.
Persistent Caching
Persistent object caching stores data in external memory systems like Redis or Memcached that survive across multiple page loads, different users and even server restarts depending on configuration. This is where real performance gains happen: frequently accessed data stays in memory for minutes or hours, dramatically reducing database queries.
Persistent caching requires server-level support. Either your hosting provider offers Redis or Memcached as a managed service, or you install it yourself on a VPS. This is available on managed WordPress hosting and higher-tier VPS plans. Query times drop from milliseconds to microseconds, handling 100 to 500 or more concurrent users. Without persistent caching, your database becomes the bottleneck during traffic spikes. With it, most requests never touch the database at all.
The Main Benefits of Object Caching for Your Website
Object caching addresses specific performance challenges that website owners face as their sites grow. WooCommerce shops, membership platforms and high-traffic blogs see the most noticeable improvements.
Faster Page Load Times
Serving data from memory instead of querying the database dramatically reduces the time your server needs to build each page. This shows up as improved Time to First Byte (TTFB), which directly affects Core Web Vitals scores. Complex pages with many queries see the most noticeable improvements: WooCommerce product pages, WordPress admin dashboards or pages with multiple widgets and dynamic content.
A WooCommerce cart page that runs 32 database queries might drop to under 10 with object caching enabled. Caching “Top Stories” sections avoids 5-second database scans. Each cached query saves milliseconds, but when you’re handling dozens of queries per page, those milliseconds add up to seconds of improvement.
Reduced Database Load and Server Resources
Every time a query is served from cache, your database server has one less task to handle, freeing up resources for other operations. This becomes critical during traffic spikes when a sale or viral post sends visitor numbers soaring. Database overload can crash your site, but object caching prevents your database from becoming a bottleneck.
Lower database load also means you can run your site on less powerful (and cheaper) hosting, or handle more traffic on your current plan. You might avoid upgrading to a larger VPS plan if object caching handles your traffic efficiently. The server CPU and RAM that would have been consumed by repetitive database queries become available for other processes.
Better Experience for Logged-In Users
Object caching particularly benefits logged-in users and personalised content scenarios where page caching can’t help. WordPress admin dashboards, WooCommerce customer accounts, membership areas and forum sites all rely heavily on database queries that can’t be pre-rendered as static HTML. Object caching makes these experiences feel snappier and more responsive.
When a customer logs into your WooCommerce shop, their order history, saved addresses and personalised product recommendations all require database queries. Without object caching, every page load means fresh queries. With it, their data stays in memory throughout their session, making navigation feel instantaneous.
Redis vs Memcached for Persistent Object Caching
Redis and Memcached are both in-memory data stores used for persistent object caching, and both are fast and effective. The key differences lie in versatility and features. Redis is more versatile, supporting complex data types, can save data to disk for persistence across server restarts and offers additional features like pub/sub messaging. Memcached is simpler, lightweight and purely in-memory, meaning data is lost on restart.
For most WordPress users, Redis is the modern standard. It’s more feature-rich, widely supported by hosting providers and handles edge cases better. Some newer platforms use Valkey, an open-source Redis alternative that emerged in 2024 and offers similar functionality. The choice often comes down to what your hosting provider offers, as many UK hosts provide Redis as standard on managed WordPress or VPS plans.
UK providers like Krystal and Pressidium include Redis as standard on their managed WordPress plans. WP Engine offers Redis but requires manual enablement via the User Portal. Both Redis and Memcached deliver the performance gains you need; Redis simply offers more flexibility if your site grows in complexity or you need advanced features beyond basic object caching.
How to Enable Object Caching on Your WordPress Site
Enabling object caching ranges from effortless to moderately technical depending on your hosting setup. Most website owners can implement it without touching code.
If Your Host Provides Managed Object Caching
Many WordPress hosts, especially managed WordPress and higher-tier VPS providers, include Redis or Memcached as a managed service. This is the easiest route: you simply enable it via your hosting control panel or ask support to activate it. Some hosts using LiteSpeed servers integrate object caching automatically with their server-level caching.
Check your hosting dashboard for a Redis or Memcached option. If you use cPanel, look for Redis in the Software section or search for “object cache” in your host’s knowledge base. If you can’t find it, contact support and ask if Redis or Memcached is available and how to enable it. Krystal’s managed WordPress plans include Redis with automatic LiteSpeed Cache integration. WP Engine users can enable it via the User Portal under the “Cache” settings.
Using a WordPress Plugin for Object Caching
If your host supports Redis or Memcached but doesn’t offer automatic integration, you can use a WordPress plugin to connect your site to the caching backend. Popular options include W3 Total Cache, LiteSpeed Cache (for LiteSpeed servers), WP Rocket (premium) and Redis Object Cache (free, dedicated plugin).
The basic process involves installing the plugin, configuring it to use Redis or Memcached (usually just entering server details if not localhost) and enabling object caching in the plugin settings. Some plugins like LiteSpeed Cache handle this automatically if your server supports it. For simplicity, if your host provides Redis, the Redis Object Cache plugin offers straightforward setup with minimal configuration. Check plugin documentation for your specific host, as connection details vary.
Checking If Object Caching Is Working
Install the Query Monitor plugin (free), load a page on your site, open Query Monitor’s panel and check the “Object Cache” section. It should show “External” for persistent caching rather than “Non-persistent”. This confirms your site is using Redis or Memcached and not just WordPress’s default in-memory caching.
Some caching plugins show object cache status in their dashboards. You can also check database query counts before and after enabling caching. Query Monitor displays the total number of MySQL queries per page load. A significant drop (for example, from 45 queries to 12) confirms object caching is working. You should see “External object cache” with Redis or Memcached listed in the Query Monitor output.
When You Actually Need Object Caching and When You Don't
Object caching delivers the most value in specific scenarios. Understanding whether your site fits these scenarios helps you decide if it’s worth pursuing.
You need object caching if:
- Your WordPress site receives thousands of daily visitors and you’re experiencing slow page loads or database timeouts
- You run a WooCommerce shop or other e-commerce platform with dynamic product catalogues and user accounts
- You operate a membership site or forum where users log in and see personalised content
- Your site uses complex page builders, multiple plugins or generates heavy database queries
- Your WordPress admin dashboard feels sluggish or times out frequently
- You’re planning for growth and want to prepare your infrastructure to scale
You can probably skip it if:
- You run a small brochure site with low traffic (hundreds of visitors per month) and mostly static content
- Your site is already on managed WordPress hosting with excellent page caching and CDN, and performance feels snappy
- You’re on basic shared hosting where Redis or Memcached isn’t available (you can’t use persistent caching without server support)
- Your site consists mainly of static pages with minimal database queries
Even if your traffic is low now, enabling object caching prepares your site to scale. The performance foundation you build today means you won’t hit a wall when visitor numbers grow.
What Object Caching Costs and Which UK Hosts Support It
Understanding the financial and provider landscape helps you make practical decisions about implementation.
Typical Costs
Object caching itself is free because Redis and Memcached are open-source software. Accessing it depends on your hosting plan. On managed WordPress hosting, Redis is often included at no extra charge on mid-to-premium tiers. On VPS hosting, you may need to install Redis yourself (free but requires technical knowledge) or pay for a managed Redis add-on, typically £5 to £15 per month depending on provider.
On basic shared hosting, persistent object caching usually isn’t available at all. You’d need to upgrade to a plan that supports it. Whilst there may be a small cost, the performance gains and ability to handle more traffic often mean you can delay upgrading to a larger hosting plan, potentially saving money overall. Paying £10 per month for Redis may let you stay on a £30 per month VPS instead of upgrading to a £50 per month plan.
UK Hosting Providers That Support Object Caching
Several UK hosting providers offer Redis or Memcached support with varying levels of integration:
- Krystal: Redis included on managed WordPress plans with LiteSpeed Cache integration, automatic setup
- Pressidium: Redis plus page caching as standard across all plans, fully managed
- WP Engine: Redis available but must be manually enabled via User Portal, included in plan price
- SiteGround: Redis available on higher-tier plans (GrowBig and above), enabled via Site Tools
- Hostinger UK: Redis support on VPS plans, tutorials available for setup
- VPS providers (CWCS, Fasthosts, etc.): Allow self-installation of Redis if you have technical skills
Check with your current or prospective host about Redis or Memcached availability and whether it’s included or an add-on. Many hosts list this in their plan comparison pages or knowledge base under “caching features” or “performance tools”.
Common Pitfalls and How to Avoid Stale Cached Data
The main risk with object caching is stale data. If cached objects aren’t purged when underlying data changes, visitors may see outdated content such as old prices, incorrect stock levels or outdated user profiles. With proper configuration and a well-maintained plugin, stale data issues remain limited in practice when you follow good maintenance habits.
Best practices to avoid stale data:
- Use a well-maintained caching plugin that automatically purges relevant cache when content is updated (WP Rocket, W3 Total Cache and Redis Object Cache plugin all handle this)
- Configure appropriate cache expiration times (Time To Live, or TTL): shorter TTLs like 1 hour for frequently changing data, longer like 24 hours for static elements
- Manually flush the object cache after major site changes (most plugins offer a “Clear Cache” button in the WordPress admin)
- Test thoroughly after enabling caching to ensure dynamic elements like cart totals and user-specific content update correctly
- Check plugin compatibility, as some poorly coded plugins or themes may not work well with object caching
If you notice broken functionality after enabling object caching, try disabling it temporarily to diagnose the issue, then contact the plugin or theme developer. Compatibility issues are uncommon with popular, well-maintained plugins, but they can occur with custom code or outdated extensions that don’t follow WordPress caching best practices.
Combining Object Caching with Other Performance Techniques
Object caching works best as part of a multi-layered performance approach. It handles server-side data retrieval, but you still need to optimise front-end assets and leverage page caching for static content.
Complementary techniques include page caching, which stores full HTML pages for anonymous visitors and works alongside object caching for complete coverage. A CDN (Content Delivery Network) serves static assets like images, CSS and JavaScript from edge servers close to visitors. Image optimisation and lazy loading reduce page weight. Database optimisation involves cleaning up post revisions, spam comments and transients. HTTP/2 or HTTP/3 support on your server improves connection efficiency. Minification and compression of CSS and JavaScript reduce file sizes.
Object caching handles server-side data retrieval whilst page caching serves static HTML and a CDN delivers assets globally. The layered approach (page caching plus object caching) is recommended for optimal results.
Many managed WordPress hosts bundle these techniques together for ease of use. Krystal’s managed WordPress plans combine LiteSpeed page caching, Redis object caching and a built-in CDN for comprehensive performance. This integration means you don’t need to configure each layer separately.
Making the Right Object Caching Decision for Your Website
As a server-side technique that stores frequently accessed data in fast memory, object caching reduces database load, speeds up page generation and improves scalability. This matters particularly for WordPress sites with dynamic content, high traffic or logged-in users. Whilst WordPress includes basic non-persistent object caching by default, real performance gains require persistent caching with Redis or Memcached, which needs server-level support from your hosting provider.
WooCommerce shops, membership sites, high-traffic blogs and sites experiencing slow admin dashboards or database bottlenecks benefit most from object caching. It’s less critical for small, low-traffic static sites on basic shared hosting. Many UK managed WordPress hosts like Krystal, Pressidium and WP Engine include Redis as standard or as an affordable add-on, making implementation straightforward via plugins like W3 Total Cache, LiteSpeed Cache or Redis Object Cache.
Object caching works best as part of a layered performance strategy alongside page caching, CDN and image optimisation. It’s not a replacement for these techniques but a powerful complement. Check if your current host supports Redis, test it on a staging site if available and monitor performance improvements with tools like Query Monitor.
Need help choosing the right web hosting provider?
- 100% free and with no obligation
- Personalised recommendation
- Response within 24 hours
Frequently Asked Questions
What is the difference between object caching and page caching in WordPress?
Page caching stores complete HTML pages and serves them to visitors without executing PHP or querying the database. It works for static content that’s identical for all visitors. Object caching stores individual data pieces like database query results, user sessions and shopping cart contents. It targets dynamic content that changes per user or updates frequently. The two work together: page caching handles anonymous visitors viewing static pages whilst object caching speeds up logged-in experiences and personalised content.
Do I need object caching if my site already has page caching enabled?
Yes, if your site serves dynamic content or has logged-in users. Page caching doesn’t help with personalised experiences because it can’t cache user-specific content. WooCommerce shops, membership sites and forums need object caching to speed up database queries for cart contents, user profiles and personalised recommendations. Page caching and object caching complement each other: page caching handles static pages for anonymous visitors whilst object caching optimises dynamic data retrieval for logged-in users and personalised content.
Is object caching available on shared hosting or do I need a VPS?
Persistent object caching (the type that delivers real performance gains) requires server-level support for Redis or Memcached. Basic shared hosting typically doesn’t offer this. You’ll find Redis support on managed WordPress hosting plans and VPS hosting. Some premium shared hosting providers include Redis on higher tiers. Check your hosting plan features or contact support to ask if Redis or Memcached is available. If not, upgrading to managed WordPress hosting or a VPS gives you access to persistent object caching.
Which is better for WordPress object caching: Redis or Memcached?
Redis is the modern standard for WordPress object caching. It supports complex data types, can save data to disk for persistence across server restarts and offers additional features like pub/sub messaging. Memcached is simpler and purely in-memory, meaning data is lost on restart. Both are fast and effective, but Redis offers more flexibility and is more widely supported by hosting providers. Most UK managed WordPress hosts offer Redis as standard. The practical choice often comes down to what your hosting provider supports rather than technical superiority.
How much does object caching cost on UK hosting plans?
Redis and Memcached are free open-source software, but accessing them depends on your hosting plan. Managed WordPress hosts often include Redis at no extra charge on mid-to-premium tiers (typically £15 to £40 per month). VPS hosting may include Redis or offer it as an add-on for £5 to £15 per month. Some providers bundle it with higher-tier plans at no additional cost. The performance gains often mean you can handle more traffic without upgrading to a larger plan, potentially offsetting the cost.
How can I tell if object caching is working on my WordPress site?
Install the Query Monitor plugin, load a page on your site and check the “Object Cache” section in the Query Monitor panel. It should show “External” for persistent caching rather than “Non-persistent”. This confirms your site is using Redis or Memcached. You can also compare database query counts before and after enabling caching. A significant drop in queries (for example, from 45 to 12) confirms object caching is working. Some caching plugins display object cache status in their dashboards as well.
written by:
Jason Carter
My name is Jason Carter and I focus on the technical side of Webhosting Benefit. With over 10 years of experience in the IT industry, I bring extensive knowledge and expertise in web hosting. I test different hosting providers, write detailed reviews and comparisons, and continuously work to improve the website so visitors get the best possible experience.






