Get-CacheCount
This PowerShell cmdlet enables the user to get the total number of items currently present in the cache. It is a vital tool for monitoring cache performance, capacity planning, and data growth in the distributed environment. This cmdlet can be used to validate data consistency across certain nodes or the entire cluster of the cache.
Get-CacheCount -Name [-Server] [-NoLogo] [-Credentials]
Examples
- This command displays total number of items currently present in the cache. This command reads the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache
- This command displays total number of items currently present in the cache. This command ignores the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache -Server "20.200.20.11,20.200.20.12"
- This command displays total number of items currently present in the cache, using security credentials. This command reads the deployment details specified in the config.ncconf.
Get-CacheCount -Name demoCache -Credentials(Get-Credential john_smith)
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 for which the item count is needed. Note: The cache must already exist on the source server. |
- |
-Server |
<String> |
Specifies a server name where the NCache Service is running and a cache with the specified cache-name is registered. You can specify one or more IP-address(es) for one or more cache-server(s). This option can be used to customize the list of IP-address(es) to be displayed. Note: Comma separated ip-addresses are to be specified in case of multiple servers inside double quotes. |
IP of local machine |
-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 with the appropriate permissions at the node. | - |