NCache 4.6 - Online Documentation

Stop Cache Using API Calls

StopCache method in NCache API is used to stop a cache on a particular server. If no server is specified the method would read information from client configuration file. If the method fails to stop the cache or fails to find information regarding the cache, ManagementException is thrown. If called from the client node, the first server listed in the client configuration file associated with the cache will be stopped. 
This example stops cache on an already started node. Cache and server name to stop cache on given node need to be specified.
       To utilize the API, include the following namespace in your application: Alachisoft.NCache.Web.Management. 
            CacheManager.StopCache(cacheName, serverName);
        catch (ManagementException ex)
            // handle exception
See Also