Method SetValue
SetValue(Object)
Sets the value of the cache item.
Declaration
public void SetValue(object value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | Object to be stored in the CacheItem. |
Examples
The following example sets value of a CacheItem.
CacheItem item = cache.GetCacheItem("productKey");
Product product = new Product();
product.Id = 1;
product.Name = "Chai";
item.SetValue(product);
cache.Insert("productKey", item);