Method StartCache
StartCache(String, CacheConnection)
Starts an OutProc cache. The end result is the same as that of starting the cache using the NCache Manager. It starts the cache on the specified cache server. If the Cache Server could not be contacted then it throws a ManagementException. It tries to get the Security Parameters from the client.ncconf.
Declaration
public static void StartCache(string cacheName, CacheConnection connection = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | cacheName | The identifier for the ICache. |
CacheConnection | connection | CacheConnection parameters for connection to cache. |
Examples
The following example shows to to start a cache from the application.
CacheConnection cacheConnection = new CacheConnection("remoteServer", 8250);
cacheConnection.UserCredentials = new Credentials("domain\\user-id", "password");
CacheManager.StartCache("demoCache", cacheConnection);