The LearnDash Redis Object Cache add-on uses Redis to cache your LearnDash site’s content. Using this add-on, you will significantly lower the number of database requests and queries running simultaneously on a page. It serves requested data from object cache, resulting in faster data fetching and page loading times. This add-on is tailored for LearnDash and WooCommerce plugins as it optimizes server’s performance on high traffic.
- To make use of this plugin, first enable the Redis Object Cache extension, available for free, from your hosting provider.
- This add-on will not cache the website’s static content e.g. images, CSS, js, fonts etc.
Table of Content
- Install the LearnDash plugin & activate it.
- Install the LearnDash Redis Object Cache add-on and activate it.
- A new sub-menu labelled “LD Cache” will be added under the “Settings” menu on the WordPress dashboard.
The ‘General’ tab displays the status and the Redis database connection information for the Redis Object Cache, when enabled.
At the bottom of the General tab, you will also find a button labelled “Flush” that refreshes and resets the Redis database.
The Groups tab allows you to add or exclude the WordPress groups that the add-on will work with.
The Exclude Pages tab allows you to exclude specific WordPress frontend pages from the add-on’s functionality.
To exclude a page, copy the slug of the page and paste it in the “Exclude Pages” field, as shown in the image below. Place a forward slash “/” before and after the page’s slug and click on the “Update Settings” button.
You can configure your add-on’s license key from the License Option tab. Enter a valid license key in the corresponding field to receive automatic updates for this product.
Note: Deactivating the add-on without disabling the Redis Object Cache may cause issues because the Redis database will remain connected. It’s advisable to disable the Redis object cache before deactivating the add-on.
This is an example of how the number of queries is reduced with LearnDash Redis Object Cache enabled:
Plugin used: Query Monitor
Number of queries with LearnDash Redis Object Cache disabled:
Number of queries with Learndash Redis Object Cache enabled:
Why is an error warning displayed on the WordPress dashboard after the Redis Object Cache is enabled?
To avoid getting this error warning, please make sure to enable the Redis Extension that is provided by your hosting provider before using this add-on.
My hosting provider doesn’t offer any Redis extension. Can I use this add-on?
You can still use the add-on, by manually adding the Redis extension to the PHP by following this method.
Is there an option that allows me to renew or reset the Redis Object Cache?
The “Flush” button, located on the General tab, resets the Redis Object Cache with a single click.
Is this plugin also optimized for other plugins?
By default, this plugin caches all the objects if there are no cache groups selected in the excluded groups from the excluded groups settings.
Can this plugin be used for caching static content?
No, this plugin is only for internal applications and caches query data into the object cache.
Are there any settings regarding the expiry of Redis Object Cache?
No, currently cached objects are set to lifetime, you have to manually flush the cache, using the “flush” button, to renew the objects.
How many optimizations in the page load speed should I expect on front-end & back-end?
In its current version, the add-on optimizes the page load speed 15% to 20% on the back-end and reduces the TTF. As a result, pages are optimized on the front-end as well.
How is LearnDash Redis Object Cache different from other Redis Cache plugins on the market?
Other Redis Cache plugins are generic and are not tailored for LearnDash LMS. With other plugins, the Redis Object Cache has issues generating LearnDash reports. However, the LearnDash Redis Object Cache add-on has handled these issues and optimized its performance.
What LearnDash queries are added into the cache and which ones are excluded from the cache by default?
By default objects/arrays responses are added into the cache and the objects/arrays of the LearnDash reports and WooCommerce sessions are excluded.
Are there any drawbacks, conflicts that I should be aware of if I use plugins like EasyDigitalDownload & PMPro so I can decide if this plugin is good for me or not?
Generally, this plugin does not have any drawbacks or conflicts because object-cache class is the same as the default WordPress cache class, it simply overrides the default class with additional features like including/excluding groups, managing expiry, and hosting cached objects in Redis which is a super-fast key-value database.
How is this plugin different from other cache plugins like WP Super Cache, WP Rocket Cache, W3 Total Cache, etc?
This plugin caches the internal application queries/objects into the Redis key-value database, from where it serves the database requests to reduce the server load. On the other hand, the WP Super Cache, WP Rocket Cache, and W3 Total Cache plugins have been developed to cache browser-level content such as images, CSS, js, fonts, etc.
My host offers a back-end cache, how would this plugin work for me?
The Server-level cache provided by hosts is not optimized for specific scenarios, which may lead to unexpected website behavior. This add-on has been developed specifically for LearnDash LMS & WooCommerce, while also optimizing other website features.
What’s the difference between host cache and our Redis plugin cache?
There are different types of caches provided by hosts, for example, Redis Object, Memcached, and Opcode. These host-provided caches are generic and most of the time are not customizable. Therefore, it is recommended to use the custom-developed LearnDash Redis Object Cache with an easy user interface where you can easily flush the cache with a single click.
How can I check if the plugin is working and optimizing the pages?
You can check this from the Admin panel by using the Query Monitor plugin which displays the number of queries executed on each page, as seen on this image. You can also check the optimization of the pages using GTmetrix and PingDom.
What if I need further optimization, do you have a plan or can you help with general site optimization?
There are various factors that we can help you optimize for your website including caching queries/objects, static content images, CSS, js and fonts, Server configuration, and managing server resources for optimization. You can contact us at this link.
Can you please clarify what you mean by optimization for WooCommerce & LearnDash?
When object caching is enabled, dynamic parts of WooCommerce & LearnDash websites will load quicker and put less strain on the database server leading to a better experience for the end-user.
What to do if all the dynamic data-driven applications, like LearnDash and WooCommerce, cannot properly retrieve new data with caching enabled?
It is not about having caching enabled causes LearnDash and WooCommerce to not properly retrieve new data, however, it is the misconfiguration of caching plugin where you might have not excluded the groups/pages from caching.
Following are the details of LearnDash & WooCommerce to exclude the dynamic parts that may cause issues and these are required to be excluded from caching.
Exporting Course or Quiz data (Second last question in the below link)
Static / non-dynamically driven pages and posts are fine with caching, but if you cache anything dynamic, at best you’ll get old data mixed in with the new data and have a mess on your hands until it’s cleared.
For dynamic data, WordPress has a special WP_Object_Cache class for caching the result of complex database queries, which may be computationally expensive to regenerate, to reduce your server load.
By default, the object caching is non-persistent, data stored in the cache resides in memory only and only for the duration of the request.
The object cache has functionalities to retrieve new dynamic data using a unique key passed in the request for the cache object.
Is it safe setting up Cloudflare for LearnDash?
This option will enable full-page caching on your Cloudflare CDN server edges. This will reduce the load on your server and improve the loading speed of your pages because by default Cloudflare will cache only your static resources.
Is the add-on compatible with the latest version of PHP?
Yes, the add-on fully supports and works well with the latest versions of PHP.
Is the add-on compatible with the latest version of Redis, Memcached, OpCode?
Yes, the add-on fully supports and works well with the latest versions of Redis, Memcached, OpCode.
How to use this add-on on the site which has any other caching plugins?
To use this add-on first disable the Object Cache from any previously installed cache plugins e.g LiteSpeed, W3 Total Cache, etc, uninstall them and remove the drop-ins (object-cache).
If I installed Redis Object Cache, Do I need to uninstall other cache plugins (like W3 Total Cache)?
If other cache plugins also offer Object Cache optimization then they may conflict. So it’s recommended to uninstall other cache plugins when you install the LearnDash Redis Object cache plugin.
- New: Added multisite and network support.
- New: Added new BuddyBoss non-persistent groups
- Fix: Fixed compatibility issue with LearnDash v220.127.116.11
- Fix: Fixed compatibility issue with BuddyBoss Theme v1.6.6
- Fix: Fixed compatibility issue with BuddyBoss Plugin v.1.5.7