• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

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 ManagementException exception. 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 show to to start cache from application.

CacheConnection cacheConnection = new CacheConnection("remoteServer", 8250);
cacheConnection.UserCredentials = new Credentials("domain\\user-id", "password");

CacheManager.StartCache("demoCache", cacheConnection);
Back to top Copyright © 2017 Alachisoft