Table of Contents

Class CachingOptions

Namespace
The.Caching
Assembly
Instagile.dll
public class CachingOptions
Inheritance
CachingOptions
Inherited Members

Properties

CompactSynchronously

By default, compaction takes place on a background thread. Setting this to true makes compaction occur immediately, placing a hard limit on the cache size but blocking writes.

public bool CompactSynchronously { get; set; }

Property Value

bool

CompactToPercentage

Target size (as percentage of max) after compaction. When the cache reaches MaxCacheSize, least-recently-used entries are evicted until total size drops below this threshold.

public double CompactToPercentage { get; set; }

Property Value

double

FetchBatchSize

Maximum number of queries to execute in a single batch. This is a latency/throughput tradeoff.

public int FetchBatchSize { get; set; }

Property Value

int

FetchSubmitTimeout

If set, imposes a timeout on reads through the cache (CacheClient<T> API calls).

public TimeSpan? FetchSubmitTimeout { get; set; }

Property Value

TimeSpan?

FlushDelay

When using IPersistentCache, StorageOutcome.Persistent data will be flushed to the store after this period elapses without any further updates.

public TimeSpan FlushDelay { get; set; }

Property Value

TimeSpan

MaxCacheSize

Maximum size (in bytes) of the cache before eviction occurs.

public long MaxCacheSize { get; set; }

Property Value

long

ReadPolicy

Determines whether cache entries are considered up-to-date.

public ReadPolicy ReadPolicy { get; set; }

Property Value

ReadPolicy

StatisticsLoggingInterval

If set, log memory usage statistics when the cache size has changed significantly in this period.

public TimeSpan? StatisticsLoggingInterval { get; set; }

Property Value

TimeSpan?

SynthesiseIncludedEntries

By default, when fetching a query with included related entities, synthetic cache entries are created for each entity from the original query, in the expectation that it may be requested with the same includes. Setting this to false disables that behavior.

public bool SynthesiseIncludedEntries { get; set; }

Property Value

bool

WritePolicy

Determines how cache entries should be stored.

public WritePolicy WritePolicy { get; set; }

Property Value

WritePolicy