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 (in Alachisoft.NCache.Web.dll) Version: (


public static readonly DateTime NoAbsoluteExpiration
Visual Basic
Public Shared ReadOnly NoAbsoluteExpiration As DateTime
Visual C++
static initonly DateTime NoAbsoluteExpiration

Field Value

Type: DateTime


When used, this field sets the absoluteExpiration parameter equal to MaxValue, which is a constant representing the largest possible DateTime value, 12/31/9999 11:59:59 PM.


The following example demonstrates how to use the NoAbsoluteExpiration field to disable absolute expirations when inserting an item in the Cache.
 Copy imageCopy
Cache cache = NCache.InitializeCache("myCache");
cache.Insert("DSN", connectionString, null, Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(10));

See Also