Clear-Cache - PowerShell Cmdlet
This PowerShell Cmdlets enables the user to clear the cache by removing all the items currently present in the cache. The PowerShell Cmdlet enables the user to perform the following:
Clear cache and asks before clearing cache.
Clear cache forcefully.
Clear the web content only.
Important
NCache OSS has different parameters in some Cmdlet instances. Please refer to the seperate Open Source PowerShell Reference to ensure intended working in this case.
Clear-Cache [-Name] [-ForceClear] [-ClearJSS] [-NoLogo] [-Credentials]
Examples of Clear-Cache - PowerShell Cmdlet
- This PowerShell Cmdlet clears the demoCache.
Clear-Cache -Name demoCache
- This command forcefully clears the cache and does not confirm with the user before clearing the cache.
Clear-Cache -Name demoCache -Force
- This command clears JavaScript or CSS content from the cache.
Clear-Cache -Name demoCache -ClearJSS
- This command clears the demoCache on the server 20.200.20.11.
Clear-Cache -Name demoCache -Server 20.200.20.11
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 the Enterprise edition. |
False |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Credentials |
<pscredential> |
Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user who has appropriate permissions at the node. | - |