Clear-Cache
Clear-cache
cmdlet enables the user to clear the cache by removing all the
items currently present in the cache. It enables the user to
Clear cache and asks before clearing cache.
Clear cache forcefully.
Clear the web content only.
Clear-Cache [-Name] [-ClearJSS] [-ForceClear] [-NoLogo] [-Password] [-UserId]
These properties are explained in detail in the Properties section.
Examples
- This command clears the items present in the cache named demoCache. Rest of the settings would remain default.
Clear-Cache -Name demoCache
- This command clears the items present in the cache named demoCache forcefully and does not ask the user for confirmation before clearing the cache. Rest of the settings would remain default.
Clear-Cache -Name demoCache -ForceClear
- This command clears all the JavaScript and CSS files from the cache named demoCache and also suppresses the display of the logo banner.
Clear-Cache demoCache –ClearJSS -NoLogo
Properties
Note: The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-Name* |
<String> |
Specifies the name of the cache which needs to be cleared. | - |
-ForceClear |
<SwitchParameter> |
Providing this parameter cleans the cache forcefully whereas in normal situations the user is asked before clearing the cache. | False |
-ClearJSS |
<SwitchParameter> |
Clears only the JavaScript and CSS files from the cache. NOTE: This option is only available in Enterprise edition. |
False |
-UserId |
<String> |
Specifies the User Id used to authorize a user if security is enabled on cache server. This User Id must be the same as the active directory user credentials. NOTE: This option is only available in Enterprise edition. |
- |
-Password |
<String> |
Specifies the password against the user Id; to authorize a user if security is enabled on cache server. This password must be the same as active directory password. NOTE: This option is only available in Enterprise edition. |
- |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |