Expiration

Expiration

Class that provides values to specify expiration of items in cache.


Constructor

# new Expiration(expirationType, expireAfter)

Instantiates Expiration to provide expiration values for items in cache.

Parameters:
Name Type Default Description
expirationType ExpirationType null

The type of expiration to be used while expiring items in cache. The value of this type varies from item to item in cache.

expireAfter TimeSpan null

Value of time in the form of that shows after how much time, the item in cache is to be expired.

Methods

# getExpirationType() → {ExpirationType}

The type of expiration to be used while expiring items in cache. The value of this type varies from item to item in cache.

Returns:

expirationType

Type
ExpirationType

# getExpireAfter() → {TimeSpan}

Get value of time in the form of that shows after how much time, the item in cache is to be expired.

Returns:

time Value of time in the form of that shows after how much time, the item in cache is to be expired.

Type
TimeSpan

# setExpireAfter(value)

Set value of time in the form of that shows after how much time, the item in cache is to be expired.

Parameters:
Name Type Description
value TimeSpan

Value of time in the form of that shows after how much time, the item in cache is to be expired.