Add Local/Remote Clients in Cache
A client is your web or application server. To configure a web or application server as a cache client ensure that the given prerequisite is fulfilled and follow the steps mentioned below:
Prerequisite
For .NET, make sure the NCache Service (NCacheSvc) is started. If it is not started, type the following command in PowerShell (run as admin):
Start-Service -Name NCacheSvc
Configure Clients
Important
At a time, your cache can only connect to 1 client, it can be local or remote.
Open %NCHOME%\config\client.ncconf file on each local/remote client machine.
Copy/paste the entire
<cache>
section from the example below to the<configuration>
section.<cache id="demoCache" load-balance="True" enable-client-logs="False" log-level="error"> <server name="20.200.20.30"/> </cache>
Make sure your
cache id
is unique within client.ncconf which contains multiple cache connections.Replace the ip address specified in the name property of
<server>
tag to your server's ip address. Mention all the cache server ip addresses here as separate<server>
tags.Please perform this step for all cache clients.
See Also
Simulate Cache Usage
Monitor Caches in PerfMon
Use NCache from .NET Application
Use NCache for ASP.NET Sessions
NCache Programmer's Guide
NCache PowerShell Guide