Learndash Redis Object Cache - Overview
The LearnDash Redis Object Cache add-on uses Redis to cache your LearnDash site’s content. By using the Redis Object Cache, the number of database requests and queries running simultaneously on a page is reduced. This results in faster data fetching and page loading times. This add-on is tailored for the LearnDash and WooCommerce plugin in order to optimize your server’s performance on high traffic.
Note:
- 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.
Installation:
- 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.
General Settings:
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.
Groups:
The Groups tab allows you to add or exclude the WordPress groups that the add-on will work with.
Exclude Pages:
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.
License Option:
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.
Example
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: