VitreousCachingOptions class
Namespace: Vitreous.Caching
Assembly: Vitreous.Caching.dll
Configuration options for the Vitreous caching pipeline.
public sealed class VitreousCachingOptionsInheritance
Section titled “Inheritance”object ← VitreousCachingOptions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties
Section titled “Properties”DefaultAbsoluteExpiration
Section titled “ DefaultAbsoluteExpiration”Absolute expiration applied when a query sets neither AbsoluteExpiration nor SlidingExpiration. Default: null, meaning such entries never expire.
public TimeSpan? DefaultAbsoluteExpiration { get; set; }Property Value
Section titled “Property Value”EnableStampedeProtection
Section titled “ EnableStampedeProtection”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; }Property Value
Section titled “Property Value”JsonSerializerOptions
Section titled “ JsonSerializerOptions”Options used by the default System.Text.Json cache serializer. Default: camelCase. Ignored when a custom IVitreousCacheSerializer is registered.
public JsonSerializerOptions JsonSerializerOptions { get; set; }Property Value
Section titled “Property Value”KeyPrefix
Section titled “ KeyPrefix”Prefix prepended to every cache key to avoid collisions with other applications
sharing the same cache store. Default: “vitreous:”.
public string KeyPrefix { get; set; }