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