NCache 4.6 - Online Documentation

Adding an Item to Data Group

The following example adds an item in NCache with the data group identifier "Product" and sub group identifier "Beverages". In this example, you use Add Operation to set group and sub-group of the item.
      To utilize the following APIs, include the following namespace in your application: Alachisoft.NCache.Web.Caching.
        Product product = new Product();
        product.ProductID = 1001;
        product.ProductName = "Chai";
        string key = "Product:" + product.ProductID;
            cache.Add(key, product, "Product", "Beverages");
        catch (OperationFailedException ex)
            // handle exception
See Also