Add Client to 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 clustered 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 demoClusteredCache 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.
In case the client is being added to clustered cache, make sure all server nodes of the cache are specified.
You need to copy this configuration on all of your cache clients.
The following sample adds the cache client to the cache demoClusteredCache running on servers 220.127.116.11 and 18.104.22.168.
In client.ncconf of the client node, add the following information about the cache and servers under the
Replace the server node IPs according to your own server node IPs.
<configuration> ... <cache id="demoClusteredCache" load-balance="True" enable-client-logs="False" log-level="error"> <server name="22.214.171.124"/> <server name="126.96.36.199"/> </cache> ... </configuration>
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 demoClusteredCache