Gaining Website Performance from Object Caching Technology
What is Web Caching in Web Design?
Web caching is a central design feature of your website's infrastructure meant to minimize network traffic while improving the perceived responsiveness of the site as a whole. In optimal web design, vaches are found at every level of a content's journey from the original server to the end user's browser.
What is the Benefit of a Caching System?
The primary purpose of an intentional caching system is to increase data retrieval performance by reducing the need to access the underlying slower storage layer. By trading off capacity for speed, a cache stores a subset of data temporarily, whereas other data stores and databases keep data in a comprehensive and durable form.
Improving Performance with Redis Object Caching
Object caching can improve database query performance both on the front end of your site and in wp-admin. Redis object caching is helpful for dynamic sites such as those running a membership site or WooCommerce.
Automatic Installation of Object Cache Pro
Redis object caching is enabled by default on all new sites. We automatically install the Object Cache Pro plugin to do this.
Manually Installing Object Cache Pro
If Redis object caching is not present on your site, you can install, activate and license it from the Nexcess Installer. If the Object Cache Pro plugin exists on the site, it can be activated from wp-admin or using a WP-CLI command:
wp plugin activate object-cache-pro
Also, check that the object-cache.php drop-in file exists in your site's wp-content folder.
To enable Redis from WP-CLI, then run this command:
wp redis enable
Forcing an Update of the Object Cache Drop-In File
To force an update of the object cache drop-in file if using the Object Cache Pro plugin, then use this WP-CLI command:
wp redis enable --force
The object cache drop-in can also be updated in wp-admin on the site from the following area in the user interface:
Settings > Object Cache
Checking the Redis Status
The WP-CLI command to check on the Redis status if using Object Cache Pro is:
wp redis info
The WP-CLI command to check on the Redis status if using Redis Object Cache:
wp redis status
Flushing the Object Cache
Flushing the object cache will clear out your site's Redis object cache. This is the same as clearing the page cache, but in this case, it would be just for the object cache. To be able to flush the object cache, you will need to run this WP-CLI command from terminal or Putty on your site server:
wp cache flush
If you are using the Object Cache Pro plugin, then you can use this WP-CLI command to clear the cache:
wp redis flush
To asynchronously flush the object cache if using the Object Cache Pro, use the --async argument at the end of the WP-CLI command:
wp redis flush --async
You can also flush the object cache from Settings > Object Cache in wp-admin on the site if you use Object Cache Pro.
If you are using the Redis Object Cache plugin, then you can flush the object cache in wp-admin; then, you will need to go to the following area in the user interface:
Settings > Redis
It is also possible to flush the object cache (applies for both Object Cache Pro and Redis Object Cache plugins) from the admin bar on your site. Click on the flush object cache section under the Nexcess logo in the admin bar. Taking this action will clear the Redis object cache from your site's server.
Checking that Redis Working
You can check that Redis is working if using Object Cache Pro on your site in wp-admin from the following area in the user interface:
Settings > Object Cache
To check if Redis is working in the Redis Object Cache plugin, then from wp-admin, go to the following area in the user interface:
Settings > Redis
Checking for the Current Version
To check that you are using the most current version of the Object Cache Pro plugin, then from wp-admin, go to the following area in the user interface:
Setting > Object Cache > Updates
Turning on Automatic Update for the Object Cache Pro Plugin
The Object Cache Pro plugin can be automatically updated with a new release from within wp-admin.
The WP-CLI command to set the Object Cache Pro plugin to be automatically updated:
wp plugin auto-updates enable object-cache-pro
If you are using the Redis Object Cache plugin, it can also be automatically updated. The WP-CLI command to set the Redis Object Cache plugin to be automatically updated:
wp plugin auto-updates enable redis-cache
Please contact support if you need any help with Redis object caching on your Managed WordPress or Managed WooCommerce sites.
Useful WordPress Links for Developers & Admins
Plugin Performance Monitor — Test Your WordPress Plugins Automatically
Don’t let changes to your website slow you down. The Nexcess Plugin Performance Monitor watches your site hourly so you don’t just see the problem - you know how to fix it.
Why Choose Nexcess?
Because we are different! Chris Lema captures "the why" in his passionate and stirring recount of a Nexcess support-related story.
Why Your Hosting Provider Matters
We’ve optimized hosting for the industry’s leading commerce and content platforms. That means speed, security, scalability and support are built-in. Backed by free migrations and 30-day money-back guarantee, let us show you why we’re the best.
No one optimizes hosting for open-source applications better than Nexcess!
- Enterprise Hosting - Scope of Support | Nexcess
- FileZilla & FTP Clients: Transfer Files Using SFTP | Nexcess
- WooCommerce: Export Orders from Your Online Store | Nexcess
- How to Customize the Nexcess MAPPS MU (Must-Use) Plugin | Nexcess
- WordPress Caching: What Does Each Option Do | Nexcess
- What is Redis Cache? Redis Cache Explained Simply  | Nexcess
Note About the Original Publication Date
This article was originally published in February 2020. It has since been updated for accuracy and comprehensiveness.