New-ClientCache - PowerShell Cmdlet
This PowerShell Cmdlet enables the user to create a new Client Cache on the specified server. User can specify the eviction policy and create InProc or OutProc cache as part of this PowerShell Cmdlet.
Note
This feature is only available in NCache Enterprise.
New-ClientCache [-CacheName] -ClientNode [-Size] [-CleanupInterval] [-ClientCacheName] [-DefaultPriority] [-EvictionPolicy] [-InProc] [-NoLogo] [-Optimistic] [-Path] [-Port] [-EvictionRatio] [-Server] [-UpdateServerConfig] [-Credentials]
Examples of New-ClientCache - PowerShell Cmdlet
- This PowerShell Cmdlet creates a new client cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache named demoCache on server 20.200.20.11, having the size 1024MB keeping rest of the settings as default.
New-ClientCache -CacheName demoCache –ClientCacheName demoClientCache -Server 20.200.20.11 -Size 1024 –ClientNode 20.200.20.12
- This command creates a new client cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache named demoCache on server 20.200.20.11 and the cache settings will be configured according to the config file placed on the given path.
New-ClientCache -CacheName demoCache –ClientCacheName demoClientCache -Server 20.200.20.11 –ClientNode 20.200.20.12 –Path C:\config.xml
- This command creates a new client cache named demoClientCache on client node 20.200.20.12 for an already registered clustered cache named demoCache on server 20.200.20.11, having size 1024 MB and the synchronization mode for the clustered cache will be optimistic.
New-ClientCache -CacheName demoCache –ClientCacheName demoClientCache -Server 20.200.20.11 -Size 1024 –ClientNode 20.200.20.12 -Optimistic
Properties
Note
The parameters with asterisk (*) on their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-CacheName* |
<String> |
Specifies the name of the clustered cache with which the client cache will be synchronized. | - |
-ClientNode* |
<String> |
Specifies the Client node in the clustered cache. | - |
-Size |
<Long> |
Specifies the size of the Cache that is allocated to the newly created client cache. | 1024 |
-CleanupInterval |
<Integer> |
Specifies the time interval in seconds after which the cache cleanup is called. | 15 seconds |
-ClientCacheName* |
<String> |
Specifies the name or Id of the new client cache to be formed. | - |
-DefaultPriority |
<String> |
If the eviction policy opted by the user is Priority based; this parameter specifies the default priority. Possible values are |
Normal |
-EvictionPolicy |
<String> |
Specifies the eviction policy for cache items. Cached items will be cleared from the cache according to the specified policy if the cache reaches its limit. Possible values are |
LRU |
-InProc |
<SwitchParameter> |
Specified by the user if the client cache needs to be inProc. If not specified the client cache will be OutProc by default. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Optimistic |
<SwitchParameter> |
Specified by the user if the user opts for optimistic Client Cache synchronization strategy to be enabled. | - |
-Path |
<String> |
Specifies the path of the cache source config which will be configured. | - |
-Port |
<Integer> |
Specifies the server port where NCache server is listening. | 8250 |
-EvictionRatio |
<Decimal> |
Specifies the eviction ratio (Percentage) for cache items. Cached items will be cleared from the cache according to the specified ratio if the cache reaches its limit. | 5% |
-Server* |
<String> |
Specifies the NCache server names/IPs where clustered cache is registered. | - |
-UpdateServerConfig |
<SwitchParameter> |
Specifies whether to update the client-node sections of server node of the specified cluster in the configuration (config) file. (It is useful when cluster nodes and client nodes are in different networks.) | True |
-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. | - |