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