Method GetValue
GetValue<T>()
Returns the value stored in the cache item.
Declaration
public T GetValue<T>()
Returns
Type | Description |
---|---|
T | Value of the cache item with the type defined. |
Type Parameters
Name | Description |
---|---|
T | Specifies the type of value obtained from the cache item. |
Remarks
This value must be serializable, otherwise
Examples
Example gets value of a cache item
CacheItem item = cache.GetCacheItem("Product0");
Product product = item.GetValue<Product>();