NCache 4.6 - Online Documentation

Using Bridge Conflict Resolver in NCache

 
In NCache bridge topology, there can be more than one active site cache and cache operations can be simultaneous. It is possible that the client connected with one active site cache adds some keys and the same key operation is performed by the other active node. In such a situation, the bridge Conflict Resolver comes into play. It resolves the conflicts and decides which key to apply on the cache depending upon the defined rules.
 
If the user has not configured any Conflict Resolver rules, then NCache uses the default Resolver rule. In the default rule, a TimeSpan is added with each operation performed on the cache and it keeps the latest operation. A check is performed on the version of the bridge item. If it has a newer time stamp or if the version is the latest or the same, it replaces that with the new entry and in case of old, it keeps the old entry.  
 
For enabling Bridge Conflict Resolver, your program needs a reference to the assembly Alachisoft.NCache.Runtime.dll that contains interface IBridgeConflictResolver provided by NCache. The class implementing this interface allows framework to resolve the conflict between existing operations and operation replicated from bridge to cache. Thus, the class needs to include the logic for Conflict Resolution between bridge and cache.
 
In This Section:
 
Explains the methods in IBridgeConflictResolver Interface.
 
Describes the steps to implement the interface code.
 
 
See Also