Add Client Node in Cache
Cache clients are lightweight modules through which cache applications can connect to hosted cache servers. You can add local or remote client nodes to existing local cache(s) in NCache.
In order to get more detailed explanation of cache clients, please see the Cache Client section.
Step 1: Add Cache Connection in client.ncconf
Please note the following points before proceeding:
There might be other caches already registered on cache server. Please paste the following config under the
<configuration>
section so that this new<cache>
section is at the same level as of other sample caches shipped with setup.You can modify this configuration to change the name from demoCache to the name of the cache to which the client is being added.
Replace the IP Addresses given in
<server>
section with the IP Addresses of your own client machines. Note that the IP addresses must be the Binded IPs.You need to copy this configuration on all of your cache clients.
The following sample adds the cache client to the cache demoCache running on servers 20.200.20.29 and 20.200.20.30.
In client.ncconf of the client node, add the following information about the cache and servers under the <configuration>
tag:
Note
Replace the server node IPs according to your own server node IPs.
<configuration>
...
<cache id="demoCache" load-balance="True" enable-client-logs="False" log-level="error">
<server name="20.200.20.29"/>
<server name="20.200.20.30"/>
</cache>
...
</configuration>
Note
Repeat this step for all client nodes.
Step 2: Verify Addition of Cache Client
To verify that the cache client has been configured successfully, open PowerShell and run the Test-Stress cmdlet from the client node which makes cache calls to the cache servers.
Test-Stress -CacheName demoCache
See Also
Remove Client from Cache
Configure Caches
PowerShell Tools
Cache Settings (config.ncconf)