Table of Contents

Class CacheInvalidation

Namespace
Cuemon.Runtime.Caching
Assembly
Cuemon.Runtime.Caching.dll

Represents a set of eviction and expiration details for a specific cache entry.

public class CacheInvalidation
Inheritance
CacheInvalidation

Constructors

CacheInvalidation(IEnumerable<IDependency>)

Initializes a new instance of the CacheInvalidation class.

public CacheInvalidation(IEnumerable<IDependency> dependencies)

Parameters

dependencies IEnumerable<IDependency>

A sequence of IDependency implementations that monitors changes in the state of the data which a cache entry depends on. If a state change is registered, the cached value becomes invalid and is removed from the cache.

CacheInvalidation(DateTime)

Initializes a new instance of the CacheInvalidation class.

public CacheInvalidation(DateTime absoluteExpiration)

Parameters

absoluteExpiration DateTime

The absolute expiration date time value from when the cached value becomes invalid and is removed from the cache.

CacheInvalidation(TimeSpan)

Initializes a new instance of the CacheInvalidation class.

public CacheInvalidation(TimeSpan slidingExpiration)

Parameters

slidingExpiration TimeSpan

The sliding expiration time from when the cached value becomes invalid and is removed from the cache.

Properties

AbsoluteExpiration

Gets the UTC absolute expiration date time value of a CacheEntry.

public DateTime? AbsoluteExpiration { get; }

Property Value

Nullable<DateTime>

The UTC absolute expiration date time value of a CacheEntry.

Dependencies

Gets a sequence of objects implementing the IDependency interface assigned to a CacheEntry.

public IEnumerable<IDependency> Dependencies { get; }

Property Value

IEnumerable<IDependency>

A sequence of objects implementing the IDependency interface assigned to a CacheEntry.

SlidingExpiration

Gets the sliding expiration time of a CacheEntry.

public TimeSpan? SlidingExpiration { get; }

Property Value

Nullable<TimeSpan>

The sliding expiration time of a CacheEntry.

UseAbsoluteExpiration

Gets a value indicating whether a CacheEntry should use AbsoluteExpiration property for cache invalidation.

public bool UseAbsoluteExpiration { get; }

Property Value

Boolean

true if a CacheEntry should use AbsoluteExpiration property for cache invalidation; otherwise, false.

UseDependency

Gets a value indicating whether this CacheEntry is relying on an IDependency implementation for cache invalidation.

public bool UseDependency { get; }

Property Value

Boolean

true if a CacheEntry is relying on an IDependency implementation for cache invalidation; otherwise, false.

UseSlidingExpiration

Gets a value indicating whether a CacheEntry should use SlidingExpiration property for cache invalidation.

public bool UseSlidingExpiration { get; }

Property Value

Boolean

true if a CacheEntry should use SlidingExpiration property for cache invalidation; otherwise, false.