Used as the lockTimeout parameter in Lock method call to disable locking expirations. This field is read-only.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.3.0.0 (4.3.0.0)

Syntax

C#
public static readonly TimeSpan NoLockExpiration
Visual Basic
Public Shared ReadOnly NoLockExpiration As TimeSpan
Visual C++
public:
static initonly TimeSpan NoLockExpiration

Field Value

Type: TimeSpan

Remarks

When used, this field sets the lockTimeout parameter equal to the Zero field, which has a constant value of zero. Then the cache item remains locked untill explicitly released.

Examples

The following example demonstrates how to use the Lock method to add an item to the Cache object using the NoLockExpiration field.
 Copy imageCopy
Cache cache = NCache.InitializeCache("myCache");
LockHandle lockHandle = new LockHandle();
cache.Lock("DSN", Cache.NoLockExpiration, out lockHandle);

See Also