Skip to content

VitreousCachingOptions class

Namespace: Vitreous.Caching
Assembly: Vitreous.Caching.dll

Configuration options for the Vitreous caching pipeline.

public sealed class VitreousCachingOptions

object ← VitreousCachingOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Absolute expiration applied when a query sets neither AbsoluteExpiration nor SlidingExpiration. Default: null, meaning such entries never expire.

public TimeSpan? DefaultAbsoluteExpiration { get; set; }

TimeSpan?

When true (the default), concurrent cache misses for the same key within this process share a single handler run instead of all calling the handler. Callers that share a run receive the same result instance.

public bool EnableStampedeProtection { get; set; }

bool

Options used by the default System.Text.Json cache serializer. Default: camelCase. Ignored when a custom IVitreousCacheSerializer is registered.

public JsonSerializerOptions JsonSerializerOptions { get; set; }

JsonSerializerOptions

Prefix prepended to every cache key to avoid collisions with other applications sharing the same cache store. Default: “vitreous:”.

public string KeyPrefix { get; set; }

string