Cache Manager

The Cache Manager asset
The Cache Manager asset

The Cache Manager allows you to configure caching within your system including turning it on, setting a cache expiry time, selecting who is affected by caching and clearing the cache. It is located under the System Management Folder in the Asset Map, as highlighted in the figure to the right.

Management of the cache is done on the Details, Clear Cache, Refresh Cache, Type Code Specific, Root Node Specific and Send Cacheable Header screens, which are explained in this chapter. For more information on the History and Logs screen, refer to the Asset Screens manual.






Tip: Caching is turned off by default. It is recommended that you turn caching on to increase the performance of your Site.

Details Screen

The Details screen of the Cache Manager allows you to turn caching on for the system as well as set the default cache expiry time.

For more information about the Status, Future Status and Thumbnail sections of the Details screen, refer to the Details Screen chapter in the Asset Screens manual.

Cache Options

The section allows you to turn caching on for the system and set the default cache expiry time.The Cache Options section of the Details screen is shown in the figure below.

The Cache Options section of the Details screen
The Cache Options section of the Details screen

The following fields are available:  

  • Matrix Caching Status: to enable caching for the system, select On in this field. Once you have turned caching on, Squiz Matrix will start caching your system. By default, this is set to Off.
  • Number of Cache Buckets: this field allows you to set the number of cache bucket directories to use for caching. The cached information is stored as files in these buckets (or directories) to avoid directory size limits. The maximum number of cache buckets created for storage is this number squared.  

    Tip: If you set a low number, each bucket will hold a large number of cache files and you may start to reach the limit on the number of files in a directory imposed by your operating system. If you set the value too high, each bucket will hold a small number of cache files, which can be inefficient in terms of performance.  

  • Default Expiry: set the length of time (in seconds) the cache file is valid. The default value is 86400 seconds, which is 24 hours. For example, if you want the cache to be refreshed every three hours enter the value 10800.  

    Tip: When an asset is updated, the cache is not automatically cleared until the Default Expiry time has elapsed. As a result, some changes may not appear on the front end of your Site until the next time the cache is refreshed.  

  • Browser Cache Expiry: set the length of time (in seconds) that the requested page is cached in the browser. Once this time has lapsed, the page will be considered expired. By default this is set to 0 meaning that this values will be the same as the value entered into the Default Expiry field.
Cache Levels

Within Squiz Matrix you can use different permissions to show different content on a page depending on whether or not the user is logged in, and if they are logged in, which User Groups the user is a member of. For example, if the user is part of the Members User Group, they can see additional content on the Home page.

When caching has been turned on, you can set up the Cache Manager so that Squiz Matrix first looks in the cache for the different versions of the page for the public and User Groups before building the page from the repository.

For some assets within the system, different versions of the asset are displayed depending on whether the user has Read, Write or Admin Permission for that asset. You can also set up the Cache Manager so that the system first looks in the cache for the different versions of the page based on the users permissions before building the page from the repository.

This section of the Details screen allows you to specify which levels of caching you would like to use. The Cache Options section of the Details screen is shown in the figure below.

The Cache Levels section of the Details screen
 The Cache Levels section

The following fields are available:  

  • Public Level Caching: select On to enable public level caching. Once you have done this, when a public user requests a page within your Site, Squiz Matrix will first look in the cache for the public page. If it does not exist in the cache, it will then build the page from the repository. Logged in users never see the public cache.
  • Permission Level Caching: select On to enable permission level caching. Once you have done this, when a user logs on and requests a page within your Site, Squiz Matrix will first look in the cache for the appropriate page according to that users permission. If it does not exist in the cache, it will then build the page from the repository.
  • Group Level Caching: select On to enable group level caching. Once you have done this, when a logged in user requests a page within your Site, Squiz Matrix will first look in the cache for the version of the page for the User Groups they belong to. If it does not exist in the cache, it will then build the page from the repository. You should only use this option if you are using User Groups for permissions, as opposed to Roles or individually assigned permissions.

These settings will only work if the Caching Status is set to On.

Cachable Root URLs

This section allows you to control the caching for each System Root URL listed on the System Configuration screen (for more information about this screen, refer to the System Configuration manual). The Cachable Root URLs section of the Details screen is shown in the figure below.

The Cacheable Root URLs section of the Details screen
The Cachable Root URLs section

If you do not want to use caching for a particular URL, deselect the Use Cache box and click Commit. This will mean that if a user views a page using that URL, the system will behave as if the _nocache suffix is being used. By default the Use Cache field is ticked for each System Root URL.

Clear Cache Screen

The Clear Cache screen allows you to clear the cache for a particular asset, an asset and its children or an asset and its dependants.

Clear Cache

This section allows you to clear the cache for a particular asset. The Clear Cache section of the Clear Cache screen is shown in the figure below.

The Clear Cache section of the Clear Cache screen
The Clear Cache section of the Clear Cache screen 

The fields that are available on this screen are as follows:

  • Choose Asset: this field allows you to select which asset to clear the cache for. With the use of the additional fields on this screen you can clear the cache for this asset only, this asset and its children or this asset and its dependants. You can also specify which asset types that you want to clear the cache for. For example, you can clear the cache for all of the PDF Files under your Site. To select additional assets, click the More… button. An additional field will appear on the screen.
  • Level: select whether you want to clear the cache for the asset(s) only, the asset(s) and its dependants or the asset(s) and its children. The asset(s) that will be used are those that are specified in the Choose Asset field above.  

    Tip: The dependants of an asset are those that cannot exist without that asset. For example, the Page Contents asset of a Standard Page, or the Question assets belonging to a Custom Form. The children of an asset are those that have been created underneath it in the hierarchy.  

  • Asset Types: select the asset type to clear the cache for. For example, if you want to clear the cache for all PDF Files in your Site, you would select your Site in the Choose Asset field, This asset and its children in the Level field and PDF File in the Asset Types field. You can select more than one asset type from the list by holding down either the Ctrl or Shift keys on the keyboard and left clicking on each type. If you want to clear the cache for all asset types, select – All Asset Types – from the list.
Clear System Wide Cache

This section allows you to clear the cache for all assets in the system. To do this, select Yes in the Delete All System Cache field and click Commit. The Clear System Wide Cache section of the Clear Cache screen is shown in the figure below.

The Clear Cache System Wide section of the Clear Cache screen
The Clear System Wide Cache section

How to Clear the Cache for an Asset

There is a Site that has the structure that is shown in the figure to the right. The cache has been set up to refresh every 24 hours. Changes have been made to the Home page and the cache needs to be cleared.

On the Clear Cache screen of the Cache Manager, the following details are entered:

  • Choose Asset: the Home page is selected in this field.
  • Level: This asset and its dependants is selected as we only want to clear the cache for the Home page and the Bodycopy assets under it.
  • Asset Types: as we only want to clear the cache for the Home page, Standard Page is selected from the list.

Once the Commit button is clicked, the cache for the Home page is cleared.

How to Clear the Cache for an Asset Type

There is a Site that has the structure that is shown in the figure to the right. The cache has been set up to refresh every 24 hours. Changes have been made to PDF Files under the Site and the cache needs to be cleared for these files.

On the Clear Cache screen of the Cache Manager, the following details are entered:

  • Choose Asset: the Intranet Site is selected in this field.
  • Level:This asset and its children is selected as all PDF Files are child assets of the Intranet Site.
  • Asset Types: as we only want to clear the cache for the PDFs, PDF Files is selected from the list.

Once the Commit button is clicked, the cache for each PDF Files under the Intranet Site will be cleared. The cache for all other assets under the Site will not be cleared.

How to Clear the Cache for an Asset Listing

There is an Asset Listing under a Site that has the structure that is shown in the figure to the right. The assets that are being listed are stored as child assets under the Asset Listing, for example Newsletter 144. If you only want to clear the cache for the Asset Listing and not for the child assets, in the Level field on the Clear Cache screen select This asset and its dependants as the Bodycopy assets are dependant assets. If you want to clear the cache for the child assets as well as the Asset Listing, select This asset and its children.

Refresh Cache Screen

The Refresh Cache screen allows you to schedule a cron job to refresh the public cache of an asset and its dependants. Normally, the cache for an asset is refreshed when the first user visits the page after the expiry time has elapsed. This process can potentially take a while, especially on assets such as the Asset Listing and the What's New page. This cron job will delete the existing cache for the asset and regenerate the cache as the Public User and hence, potentially improve the user experience. The Refresh Cache section of the Refresh Cache screen is shown in the figure below.

The Refresh Cache section of the Refresh Cache screen
The Refresh Cache section of the Refresh Cache screen

To add a new cron job, fill out the following fields in the Add a Job section:

  • Asset: select the asset to clear the cache for.
  • At: select the date and time for when the cache should be regenerated from the list provided.
  • Next Run: alternatively, click on the Next Run button to set the date and time to the next run of the Cron Manager.
  • Or In: you can set the regeneration to take place in a certain number of minutes, hours, days, weeks, months or years. Enter the number into the text box and select the appropriate time frame from the list provided.
  • Repeat this process: if you want to repeat the cron job, enter the time between runs in the fields provided. For example, if you want to clear the cache of the Home page every 2 days, enter 2 days in this field. Enter the number in the first field and select the appropriate time frame in the second list.

Once you have filled out the required information, click Commit. The cron job will appear in the Current Jobs section, as shown in the figure below.

A cron job in the Current Jobs section of the Refresh screen
The Current Jobs section

To delete a job, select the Delete box and click Commit. The cron job will no longer be run.

Type Code Specific Screen

The Type Code Specific screen allows you to override the default settings on the Details screen and configure the caching status and expiry for specific asset types in the system. The Select Asset Type section of the Type Code Specific screen is shown in the figure below.

The Select Asset Type section of the Type Code Specific screen
The Select Type section of the Type Code Specific screen

To configure a particular asset type, select it from the Configure Type Code list and click Go. For example, to configure the settings for a Standard Page, select Standard Page from the list. Additional fields will appear in the Type Code Cache Management section, as shown in the figure below.

The Type Code Cache Management section of the Type Code Specific screen (with Defaults)
The Type Code Cache Management section for the Standard Page Type

To customise a setting, deselect the Use Default option and click Commit. Additional fields will appear, as shown in the figure below.

The Type Code Cache Management section of the Type Code Specific screen
The Type Code Cache Management section not using the default values

You can modify the following settings for each asset type:

  • Matrix Caching Status: select whether to enable or disable caching for the selected asset type. The default setting is the value that is selected in the Caching Status field on the Details screen. To revert back to this default setting, select Use Default and click Commit.
  • Default Expiry: set the length of time (in seconds) a cache entry is valid for the selected asset type. The default setting is 86400 seconds, which is 24 hours. The default setting is the value that is entered into the Default Expiry field on the Details screen. To revert back to this default setting select Use Default and click Commit.
  • Browser Cache Expiry: set the length of time (in seconds) that the requested asset is cached in the browser. Once this time has lapsed, the page will be considered expired. The default settings is the value that is entered into the Browser Cache Expiry field on the Details screen. To revert back to this default setting, select Use Default and click Commit.
  • Send Cacheable Header: select whether or not to send cacheable headers for the selected asset type. If this field is enabled,cacheable headers will always be sent, regardless of Squiz Matrix's caching settings

Root Node Specific Screen

The Root Node Specific screen allows you to override the default settings on the Details screen and configure the caching status and expiry for specific root nodes in the system. The Select Root Node section of the Root Node Specific screen is shown in the figure below.

The Select Root Node section of the Root Node Specific screen
The Select Root Node section of the Root Node Specific screen

To configure a particular root node, select it in the Configure Root Node field, select whether or not to include its child assets and click Commit. The Customise field will appear on the screen, as shown in the figure below.

The Select Root Node section of the Root Node Specific screen (root node selected)
The Customise field in the Select Root Node section

Select the Customise option. Additional fields will appear in the Root Node Cache Management section, as shown in the figure below.

The Root Node Cache Management section of the Root Node Specific screen (with Defaults)
The Root Node Cache Management section with additional fields

To customise a setting, deselect the Use Default option and click Commit. Additional fields will appear, as shown in the figure below.

The Root Node Cache Management section of the Root Node Specific screen
The Root Node Cache Management section using the default values

You can modify the following settings for each root node:

  • Caching Status: select whether to enable or disable caching for the selected root node. The default setting is the value that is selected in the Caching Status field on the Details screen. To revert back to this default setting, select Use Default and click Commit.
  • Default Expiry: set the length of time (in seconds) a cache entry is valid for the selected root node. The default setting is 86400 seconds, which is 24 hours. The default setting is the value that is entered into the Default Expiry field on the Details screen. To revert back to this default setting select Use Default and click Commit.
  • Browser Cache Expiry: set the length of time (in seconds) that the selected root node is cached in the browser. Once this time has lapsed, the page will be considered expired. The default settings is the value that is entered into the Browser Cache Expiry field on the Details screen. To revert back to this default setting, select Use Default and click Commit.
  • Send Cacheable Header: select whether or not to send cacheable headers for the selected root node. If this field is enabled,cacheable headers will always be sent, regardless of Squiz Matrix's caching settings

Send Cacheable Header Screen

The Send Cacheable Header screen allows you to set the root URLs of your system for which cacheable headers will always be sent, regardless of Squiz Matrix's caching settings. To configure these settings, the Send Cacheable Header option must be enabled on your system. The status of this field can be viewed in the Send Cacheable Headers Settings section, shown in the figure below.

The Send Cacheable Headers Settings section of the Root URL Specific screen
The Send Cacheable Headers Settings section

Please note that the Send Cacheable Header field is not editable on this screen. This option is configured on the System Configuration screen. By default, this field will be set to No. For more information on the Send Cacheable Header field, refer to the System Configuration chapter in the System Configuration manual.

You can specify the protocol to send cacheable headers on in the Protocol(s) field - either HTTP Only, HTTPS Only or Both. By default, this field will be set to HTTP Only.

The cache control levels of each protocol can be individually set in the HTTP and HTTPS Cache Control Level fields - either Public or Private. By default, both these fields will be set to Public.

A list of the system's root URLs will be displayed in the Root URLs to Send Cacheable Headers section of the screen, as shown in the figure below.

The Root URLs to Send Cacheable Headers section of the Root URL Specific screen
The Root URLs to Send Cacheable Headers section 

The Send Headers and Public User Only options are available for each URL listed in this section. By default, these options are enabled, meaning that cacheable headers will be sent for pages served to users who are not logged-in (public users) on each of these URLs.

Deselecting the Public User Only option will mean that cachable headers will also be sent for pages served to logged-in users on the corresponding URL.

To disable the sending of cacheable headers on a particular URL, deselect the corresponding Send Headers field and click Commit.

PreviousNext