CacheCleaner.exe command-line switches
CacheCleaner is an executable that can be used to explicitly purge the Nomad cache. By default, the Nomad cache is not purged unless there is an active download. In most cases, available disk space is not really an issue, but there may be circumstances where you may want to manage the cache to keep the disk usage overhead to a minimum. Please refer to Cache management for further information about managing the cache.
It is installed as part of Nomad and the format of the command-line is:
CacheCleaner.exe -switch
Where switch
is one of the following (case-sensitive):
Switch name |
Default value |
Range |
Description |
---|---|---|---|
- |
1 |
1-9 |
Only cache contents with a priority equal to or lower than the |
- |
|
|
Sets the debug level for |
- |
|
|
Deletes all cache content where the priority is less than or equal to the value for Force. If the command-line does not include |
- |
|
|
The ID of the package or content to be deleted from the cache. The value must be set to the PackageID or ContentID string that identifies the content to be deleted. Must be used in conjunction with
|
- |
|
|
Content whose cache priority is less than or equal to the |
- |
|
1-1461 |
The maximum number of days before the contents of a cache is purged. If set, This argument is ignored if If the command-line includes |
|
10 |
1-99 |
Deletes the lowest cache priority content until the set percentage of available disk is available. |
- |
|
|
Only caches with a priority equal to or lower than the Determine the space to be cleared when running For example, the following are equivalent:
|
- |
|
|
Identifies the content version to be deleted and must be used in conjunction with The special value -PkgVer=* may be used when the user is unsure of the specific version of the package in the cache. Note Setting -PkgVer=* will delete any version of the content with the ID specified in the DeletePkg argument from the Nomad cache only – it will not delete from the Configuration Manager client cache. Note If you want to remove Application or Software Updates content, then the -PkgVer will usually need to be set to "1". |
If the Nomad cache is deleted while another client is accessing it, the other client will recover by downloading directly from the DP. This is by design and ensures recovery occurs in order to complete a successful download.
CacheCleaner examples
In the following examples, there is no requirement to specify the path to CacheCleaner.exe because the path to Nomad executables is set in the PATH environment variable:
Example |
Description |
---|---|
Set the cache cleaner to run as a Configuration Manager program. |
You can set the cache cleaner to run as a Configuration Manager program and advertise it to all Nomad systems in a single operation. You can also schedule this as a regular housekeeping job, ensuring that the cache is kept under control automatically. To purge the cache when the total free disk space is at 20% run:
|
Ensure that content in the cache is not kept for more than 30 day. |
To ensure that content in the cache is not kept for more than 30 days, run:
|
Delete a particular package and version. |
To delete a particular package and version, run:
|
Purge the contents of a cache with a priority of 3 or lower. |
To purge the contents of a cache with a priority of 3 or lower, run:
|
Purge the contents of a cache with a particular priority and size. |
To purge the contents of a cache with a particular priority and size, run:
|