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