Clear Squid cache tool

Squid is a caching proxy for the web that improves response times by caching and reusing frequently-requested web pages.

The clear Squid cache tool allows users to clear or repopulate the Matrix Squid cache for an asset. A one-off or repeating scheduled job can also be created and scheduled using this tool.

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

This tool relies on initially configuring the Squid cache in the System configuration  External tools  Squid cache preferences settings.
You must configure these settings before using this tool. Read External tools configuration for more information about this screen.

Settings

This section allows you to clear the Squid cache for a particular asset and its children.

The Clear Squid cache section of the Clear Squid cache screen

You select one or more options explained below and then select Clear Cache to clear the conditions in the cache for the selected assets.

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

Assets

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

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.

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.

Clear cache of arbitrary URLs

This section allows you to clear the Squid cache for arbitrary URLs.

The clear cache of arbitrary URLs section of the Clear Squid cache screen

This method is useful if you want to clear the Squid cache on URLs that are not associated with an asset, such as a 301 remap or 404 pages.

To clear the cache for arbitrary URLs:

  1. Enter each page’s URLs to clear the cache and enter each URL on a new line.

  2. Select Clear Cache to clear all cache records for the URLs.