Set-BridgeCacheMode
This PowerShell cmdlet enables users to change the mode of a cache participating in an NCache Bridge by setting it as Active or Passive. It is used in WAN replication scenarios to control the direction of data synchronization. An Active cache acts as the primary source and sends updates, while a Passive cache functions as a secondary replica that receives updates.
Set-BridgeCacheMode -Name -CacheFullName -Mode {Active | Passive} -Server [-Port] [-Credentials] [-NoLogo]
Examples
- This command changes the mode of clustered cache demoCache.WestCoast to active mode.
Set-BridgeCacheMode -Name demoBridge -Server 20.200.20.11 -CacheFullName demoCache.WestCoast -Mode Active
- This command changes the mode of clustered cache demoCache.WestCoast to passive mode.
Set-BridgeCacheMode -Name demoBridge -Server 20.200.20.11 -CacheFullName demoCache.WestCoast -Mode Passive
- This command changes the mode of clustered cache demoCache.WestCoast to active mode using security credentials.
Set-BridgeCacheMode -Name demoBridge -Server 20.200.20.11 -CacheFullName demoCache.WestCoast -Mode Active -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 Bridge registered on the server. | - |
-CacheFullName* |
<String> |
Specifies the name of the clustered cache with its environment name that is to be added to the Bridge. | - |
-Mode* |
<BridgeCacheStateParam> |
Specifies the mode of the Bridge. Can be either Active or Passive. |
Active |
-Server* |
<String> |
Specifies the server name where the NCache Bridge Service is running and a Bridge with the specified Bridge-name is registered. | - |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
-Port |
<Integer> |
Specifies the port on which the NCache Bridge Service is listening. | 8260 |
-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. | - |