<PackageReference Include="Relativity.Server.Utility.SDK" Version="14.2.7" />

CachingOptions

public class CachingOptions
Represents options for cache entry creation and expiration.
public bool CacheNullValues { get; set; }

Whether null values will be stored in the cache, or returned without being stored.

public bool DisposeRemovedEntries { get; set; }

Gets or sets whether entries implementing IDisposable should be disposed when they are removed from the cache.

public TimeSpan ExpirationTimeSpan { get; }

The amount of time that an object remains in the cache before it expires. Use Zero. to indicate that objects in the cache never expire. The value cannot be negative. See ExpirationType for more information about expiration.

public ExpirationType ExpirationType { get; set; }

Determines if the ExpirationTimeSpan specified is an absolute or sliding expiration.

The maximum amount of time the cache will wait for a value factory to execute before it throws an error. This value must be greater than Zero.

public int MaxValueFactoryRetryAttempts { get; set; }

The maximum number of times that the cache will attempt to execute a value factory before it gives up and throws an error.

public bool WaitForCompletionOnTimeout { get; set; }

Whether or not the cache should wait until a value factory completes when the MaxValueFactoryExecutionTime is exceeded.

public CachingOptions(Func<TimeSpan> expirationTimeSpan, ExpirationType expirationType)

Creates a new set of caching options.

public CachingOptions(TimeSpan expirationTimeSpan, ExpirationType expirationType)

Creates a new set of caching options.

public CachingOptions(Func<TimeSpan> expirationTimeSpan, ExpirationType expirationType, Func<TimeSpan> maxValueFactoryExecutionTime)

Creates a new set of caching options.

public CachingOptions(TimeSpan expirationTimeSpan, ExpirationType expirationType, TimeSpan maxValueFactoryExecutionTime)

Creates a new set of caching options.

public CachingOptions(Func<TimeSpan> expirationTimeSpan, ExpirationType expirationType, Func<TimeSpan> maxValueFactoryExecutionTime, int maxValueFactoryRetryAttempts, bool waitForCompletionOnTimeout, bool cacheNullValues, bool disposeRemovedEntries)

Creates a new set of caching options.

Creates a copy of the caching options.