NCache 4.6 - Online Documentation

Tagging Data through CacheItem

In this example tags are set by assigning them as a property of CacheItem in NCache.
       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";
        string key = "Product:" + product.ProductID;
        CacheItem cacheItem = new CacheItem(product);
        cacheItem.Tags = productTags;
            cache.Add(key, cacheItem);
        catch (OperationFailedException ex)
            // handle exception
See Also