Show / Hide Table of Contents

# Class ExpiryPolicy

Default expiry policy implementation with all durations defined explicitly.

##### Inheritance

System.Object
ExpiryPolicy

##### Implements

IExpiryPolicy

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Apache.Ignite.Core.Cache.Expiry

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public class ExpiryPolicy : IExpiryPolicy

### Constructors

#### ExpiryPolicy(Nullable<TimeSpan>, Nullable<TimeSpan>, Nullable<TimeSpan>)

Constructor.

##### Declaration

    public ExpiryPolicy(TimeSpan? create, TimeSpan? update, TimeSpan? access)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Nullable<System.TimeSpan> | create | Expiry for create.
System.Nullable<System.TimeSpan> | update | Expiry for udpate.
System.Nullable<System.TimeSpan> | access | Expiry for access.

### Methods

#### GetExpiryForAccess()

Gets expiry for access operation.

If `TimeSpan.ZERO` is returned, cache entry is considered immediately expired.

If `null` is returned, no change to previously understood expiry is performed.

##### Declaration

    public TimeSpan? GetExpiryForAccess()

##### Returns

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | Expiry for access operation.

#### GetExpiryForCreate()

Gets expiry for create operation.

If `TimeSpan.ZERO` is returned, cache entry is considered immediately expired and will not be added to cache.

If `null` is returned, no change to previously understood expiry is performed.

##### Declaration

    public TimeSpan? GetExpiryForCreate()

##### Returns

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | Expiry for create opeartion.

#### GetExpiryForUpdate()

Gets expiry for update operation.

If `TimeSpan.ZERO` is returned, cache entry is considered immediately expired.

If `null` is returned, no change to previously understood expiry is performed.

##### Declaration

    public TimeSpan? GetExpiryForUpdate()

##### Returns

Type | Description
--- | ---
System.Nullable<System.TimeSpan> | Expiry for update operation.

### Implements

IExpiryPolicy