CacheItemAttributes

CacheItemAttributes

# new CacheItemAttributes()

Methods

# getAbsoluteExpiration() → {TimeSpan}

Gets Absolute Expiration for the object

Returns:
Type
TimeSpan

# getDependency() → {CacheDependency}

The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies , this property contains a null.

Returns:
Type
CacheDependency

# setAbsoluteExpiration(absoluteExpiration)

Sets the Absolute expiration for the object

Parameters:
Name Type Description
absoluteExpiration Date

Sets absolute expiration. You can add an item to the cache with absolute expiration by specifying the exact date and time at which the item should be invalidated. When this time is elapsed, the item will be removed from the cache.

# setDependency(cacheDependency)

The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies , this property contains a null.

Parameters:
Name Type Description
cacheDependency CacheDependency

cacheDependency object