NCache 4.6 - Online Documentation

Updating Data to Cache Asynchronously

 
An InsertAsync method enables the user to update existing data in NCache in an asynchronous manner.
 
      To utilize the API, include the following namespace in your application: Alachisoft.NCache.Web.Caching.
 
Product product = new Product();
product.ProductID = 1001;
product.ProductName = "Chai";
product.Category = 5; // updated category
 
CacheItem cacheItem = new CacheItem(product);
 
string key = "Product:" +product.ProductID ;
 
try
{
              cache.InsertAsync(key, cacheItem, DSWriteOption.None, null);
}
catch (Exception ex)
{
// handle exception
      }
 
 
 
See Also