Field DefaultAbsolute
A read only field, used to set expiration for cache entry while adding data to cache. Item will be expired from the cache within DefaultAbsolute value + cache clean up interval. The value for this field is given from NCache Manager. Minimum value for DefaultAbsolute expiration is 5s.
Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web.dll
Syntax
public static readonly DateTime DefaultAbsolute
Returns
Type | Description |
---|---|
System.DateTime |
Examples
The following example demonstrates how to use DefaultAbsolute to add an item to the cache.
Product product = new Product();
product.ProductID = 1001;
product.ProductName = "Chai";
string key = "Product:" + product.ProductID;
cache.Add(key, product, null, Cache.DefaultAbsolute, Cache.NoSlidingExpiration, CacheItemPriority.Default);