Advanced Cache

The Advanced Cache plugin works in a similar way to the standard KCW Cache plugin, but it also works for logged in users as well as non-logged in users. This is accomplished by generating customer-specific page elements and replacing the equivalent elements in the cache file with the customer-specific versions.

This means that when a customer logs in or adds an item to their basket, they still get a performance increase on page loads due to the caching, which they did not get with the previous version.

NOTE: This is totally separate from other caches that we use, such as the category structure cache.


Automatic Clearing

The Advanced Cache plugin has been written to integrate fully with Wordpress and Khaos Control Web, and to this end it has a number of triggers that will automatically clear specific parts of the cache, so as to keep the website as up to date as possible.

When an order is placed, the cache files for all of the products are cleared, so as to avoid any issues with incorrect stock levels, etc.

When you save a Page in the CMS, the cache for that page will be cleared, so that the changes you make will immediately show up.


Accessing the Advanced Cache Settings

You can access the main KC:Web Settings by going to “KC:Web Settings” -> “Available Options” on the left-hand menu.


You will then need to click on the “Advanced Cache” tab to switch the view to the options for this plugin.



Available Options

Enable Page Caching: Select whether to cache pages on the website for all users.

Cache Time: Set the length of time pages should be cached for.

Enable CSS Inline Caching: Select whether to cache the website CSS and load it inline.

Enable JS Inline Caching: Select whether to cache the website JS and load it inline.

CSS File Exclusions: Enter comma-separated list of CSS file names to exclude from being inline cached.

JS File Exclusions: Enter comma-separated list of JS file names to exclude from being inline cached.

Enable CSS File Caching: Select whether to cache the website CSS and load it in a single file (Inline caching is prioritised if both are set).

Enable JS File Caching: Select whether to cache the website JS and load it in a single file (Inline caching is prioritised if both are set).

Enable Image Optimisation: Select whether to automatically convert images from Wordpress to WEBP format and serve those instead of the original images.

 

Clearing the Cache

If you make changes to the category structure, or product data, and want to update the site straight away rather than waiting for the cache to expire there is a new option in the CMS’s top banner to allow you to do this.

Simply log in and click the “Clear KCW Cache” button and all of the cache files, for all sites in the Wordpress Network, will be removed and regenerated on the next page load.


Did you find this article helpful?