New-ClientCache
Note
This feature is only available in NCache Enterprise Edition.
New-ClientCache
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.
New-ClientCache [-CacheName] -ClientNode [-Size] [-CleanupInterval] [-ClientCacheName] [-DefaultPriority] [-EvictionPolicy] [-InProc] [-NoLogo] [-Optimistic] [-Password] [-Path] [-Port] [-Ratio] [-Server] [-UpdateServerConfig] [-UserId]
These properties are explained in detail in the Properties section.
Examples
- 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 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 and the synchronization mode for the clustered cache will be optimistic.
New-ClientCache demoCache –ClientCacheName demoClientCache -Server 20.200.20.11 –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. | - |
-Server* |
<String> |
Specifies the NCache server names/IPs where Cache should be configured. | - |
-ClientCacheName* |
<String> |
Specifies the name of the new client cache to be formed. | - |
-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 |
-Size |
<Integer> |
Specifies the size of the Cache that is allocated to the newly created cache. | - |
-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 |
-Ratio |
<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% |
-DefaultPriority |
<String> |
If the eviction policy opted by the user is Priority based; this parameter specifies the default priority. Possible values are |
Normal |
-Optimistic |
<SwitchParameter> |
Specified by the user if the user opts for optimistic Client Cache synchronization strategy to be enabled. | - |
-ClientNode* |
<String> |
Specifies the Client node in the clustered cache. | - |
-CleanupInterval |
<Integer> |
Specifies the time interval in seconds after which the cache cleanup is called. | 15seconds |
-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 |
-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. | 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. | - |
-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. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |