After you are done using the cache, you should dispose it in order to free the resources being used up by the cache.
To utilize the API, include the following namespace in your application:
string cacheName = "myreplicatedcache"; Cache cache = NCache.InitializeCache(cacheName); // Dispose the cache cache.Dispose();
If you are developing ASP.NET application, the best place to place the
Dispose() call is in your HTTP application's
Dispose() method. This method is called when the instance of your HTTP application is destroyed.