Field NoAbsoluteExpiration
Used in the absoluteExpiration
parameter in an Insert method call to
indicate the item should never expire. This field is read-only.
Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web.dll
Syntax
public static readonly DateTime NoAbsoluteExpiration
Returns
Type | Description |
---|---|
System.DateTime |
Remarks
When used, this field sets the absoluteExpiration
parameter equal
to System.DateTime.MaxValue, which is a constant representing the largest possible
System.DateTime value, 12/31/9999 11:59:59 PM.
Examples
The following example demonstrates how to use the NoAbsoluteExpiration field to disable absolute expirations when inserting an item in the Cache.
Cache cache = NCache.InitializeCache("myCache");
cache.Insert("DSN", connectionString, null, Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(10));