NCache 4.6 - Online Documentation

Viewing Cache Status Using API Calls

 
GetCacheHealth method enables the user to view the status of cache server nodes. This method call returns a CacheHealth object against every call.
 
      To utilize the API, include the following namespace in your application: Alachisoft.NCache.Web.Management. 
 
In this example the user only needs to specify the cache name, the API uses client configuration file to connect to the server nodes and collect information; the initial node can also be specified. In case of failure of connection or incorrect cache name, the NCache would throw Management Exception.
 
        try
        {
            CacheHealth cacheHealth = CacheManager.GetCacheHealth(cacheName);
        }
        catch (ManagementException)
        {
            // handle exception
        }
 
 
See Also