KCW Cache

KCW Cache

The KCW Cache plugin generates a static HTML version of pages and serves that to any user that is not logged in and doesn’t have an active basket.
This means that once a customer adds an item to their basket, or logs into their account, they will not receive the cached version of the site. This stops any issues with differing price list prices, different currencies, etc and makes sure that the cached version is always the base version of the site.
NOTE: This is totally separate from other caches that we use, such as the category structure cache, as those other cached items are still used as normal by logged in users, etc.

Automatic Clearing

The KCW 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 KCW 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 “Cache” tab to switch the view to the options for this plugin.


Available Options

Enable Page Caching: Select whether to enable caching on the site, this is a prerequisite for all other options.

Cache Time: Set the amount of time the cache should last for. Once this time has expired the cache will refresh with the next page load.

Enable CSS Inline Caching: Select whether to enable optimisation of the stylesheet files. This will collate all stylesheets used on the site and insert them into the page content to avoid having to load the files separately.

Enable JS Inline Caching: Select whether to enable optimisation of the JavaScript files. This will collate all JavaScript files used on the site and insert them into the page content to avoid having to load the files separately.

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 enable the alternative optimisation of the stylesheet files. This will collate all stylesheets used on the site into a single file, and load that during the page load. This is generally used for debugging issues, or if there is an issue with loading the stylesheet files inline. The Inline option will be prioritised if both options are enabled.

Enable JS File Caching: Select whether to enable the alternative optimisation of the JavaScript files. This will collate all JavaScript files used on the site into a single file, and load that during the page load. This is generally used for debugging issues, or if there is an issue with loading the JavaScript files inline. The Inline option will be prioritised if both options are enabled.

Enable Image Optimisation: Select whether to enable the image optimisation. This will replace the URLs for all images with WEBP versions, which is a more optimised image type, as long as the browser is compatible with WEBP files. If the file is part of the theme then a WEBP version will be generated and saved within the theme, and if it is a product/category image loaded from your Image site, it will generate a WEBP version in the same way as it generates the specifically sized versions of 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.


    • Related Articles

    • 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 ...
    • Setup a KCW Compatible Keycode

      1. Log into your Khaos Control application. 2. Go to "Promotion" on the left-hand menu. 3. Go to the "Keycode" tab and create a new Keycode. 4. Enter the "Code", "Description", "Keycode Date", etc fields as required. 5. Make sure the "Web" checkbox ...
    • New categories and/or products are not showing

      The website uses advanced techniques to ensure performance is delivered, this means for some aspects we need to cache the structure of the website to a certain time limit. If your products need to be shown instantly or you are using the staging ...
    • v3.6.1.0

      - Improved the handling of WorldPay notifications for orders that have already been completed. - Fixes some issues with the GA4 enhanced ecommerce tracking and improved the data types being sent in event data. - Fixed an issue with trying to complete ...
    • Useful Information

      Setting up a Gift Wrap Product This is only applicable if your website has the functionality enabled for gift-wrapping orders. If you wish to add this to your website, please contact the Khaos Control Web team. In order for gift wrapping to be used, ...