Clear Matrix cache tool

The Clear Matrix cache tool allows users to clear the Matrix cache for an asset. You can also create a one-off or repeating scheduled job using this tool. These options are similar to the cache manager’s options but are available to all administration interface users.

The tool is available from Tools  Clear Matrix cache in the Matrix toolbar.

Settings

This section allows you to clear the cache for selected asset, its dependents and, optionally, its children.

It also allows for the optional repopulating of the cache.

The dependents 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 assets created underneath it in the asset hierarchy.

The Clear Matrix cache section of the Clear Matrix cache screen is shown in the figure:

The Clear Matrix cache section of the clear Matrix cache screen

The settings available on this screen are:

Assets

Sets the asset or assets which will have their Matrix cache cleared. Click the to set more than one asset.

Asset types

Sets the asset type which will have its Matrix cache cleared. To select more than one asset type from the list, hold down either the Ctrl or Shift key on the keyboard and left-click on each type. To clear the Matrix cache for all asset types, leave this field blank.

Clear this cache now

Check this box and select Clear Cache to clear the cache of the specified asset or assets.

Clear the cache of the selected assets and its children

Check this box to also clear the cache of children of the specified asset or assets.

Request

Check this box this to re-cache the asset once its cache has been cleared.

Schedule a cache clearing job

Check this box to present a scheduling UI for setting up a clearing schedule for the selected assets and conditions. Read Job scheduling for more information.

This option does not counter-indicate the Clear this cache now option.

If both Clear this cache now and Schedule a cache clearing job are checked and a job schedule is setup, clicking the Clear cache will both clear the cache immediately and setup the requested cache clearing job schedule.

Clear cache

click this Clear cache to clear the cache as per the conditions set, or setup a cache clearing job schedule for the conditions set, or both.

For example, to clear the cache for all PDF files in a site

  1. set the Assets field to the site’s root folder;

  2. set the Asset types field to PDF File;

  3. check the Clear the cache of the selected assets and its children checkbox; and

  4. click the Clear Cache.

Job scheduling

When the Schedule a cache clearing job checkbox is checked, a UI for scheduling a cache clearing job is revealed below the checkbox.

The schedule a cache clearing job UI

This UI allows for scheduling either a one-off cache clearing job or repeating cache clearing jobs.

Schedule a one-off job

Use the following field combinations to schedule a one-off scheduled job:

  1. Set the date and time when the cache is to be cleared using the day, month, year, hour, and minute pop-up menus.

    or

    Enter an integer in the text-box and select a time frame — minutes, hours, days, weeks, months, or years — from the time-frame pop-up menu to set a one-off scheduled job for that number of minutes, hours, days, weeks, months, or years from now.

  2. Select Clear Cache to save the scheduled cache clearing job.

The UI allows both an absolute future date and time to be set and a relative future time to be entered.

That is, selecting values in the day, month, year, hour, and minute pop-up menus does not prevent an integer being entered in the text-box and a time-frame being selected from the time-frame pop-up menu.

However, if both an absolute and relative future time are set and the Clear Cache is pressed, only the relative future time is added to the saved cache clearing job schedule.

Schedule a repeating job

To schedule a repeating cache clearing job

  1. Set an absolute or relative future time for the first of the repeating cache clearing jobs as per the Schedule a one-off job procedure.

  2. Select the repeating time unit — minutes, hours, or days — from the Clear this cache every pop-up menu.

    An integer pop-up menu interposes between the Clear this cache every label and the time unit pop-up menu.

  3. Select an integer from this menu to set the number of minutes, hours, or days between cache clearing job runs.

  4. Select Clear Cache to save the scheduled cache clearing job.

Scheduled jobs

When the Clear Cache is pressed and the one-off or repeating job is saved, the saved jobs are presented in a Scheduled Jobs table immediately below the Job scheduling label and checkbox.

The Scheduled cache clearing jobs section

Each scheduled job lists

  • Asset: the asset it affects.

  • Cascade: whether or not the job also affects the Asset’s children.

  • Recache: whether or not the job also recaches the assets.

  • At: when the job runs and whether or not it is a repeating job.

  • Job Name: the job’s name.

  • Run As: which user the job runs under and what permissions the job runs with.

Deleting scheduled jobs

At the end of each scheduled cache clearing job listing is a Delete checkbox.

To delete a scheduled cache clearing job:

  1. In the Assets field enter the ID of a single asset, or select a single asset from the asset tree.

  2. Leave all Options unchecked.

  3. Leave the Schedule a cache clearing job checkbox unchecked.

    The above steps set up a dummy cache clearing condition.

    No actual cache clearing will occur, but the tool must have a cache clearing condition set before it will make any changes.

  4. Check the Delete checkbox of the scheduled cache clearing job to be deleted.

    (Checking the Delete checkbox in Scheduled Jobs table header checks the Delete checkbox for all scheduled cache clearing jobs.)

  5. Select Clear Cache

    The selected scheduled cache clearing jobs are deleted.