HybridCacheEntryOptions Class

Definition

Specifies additional options (for example, expiration) that apply to a HybridCache operation. When options can be specified at multiple levels (for example, globally and per-call), the values are composed; the most granular non-null value is used, with null values being inherited. If no value is specified at any level, the implementation can choose a reasonable default.

public ref class HybridCacheEntryOptions sealed
public sealed class HybridCacheEntryOptions
type HybridCacheEntryOptions = class
Public NotInheritable Class HybridCacheEntryOptions
Inheritance
HybridCacheEntryOptions

Remarks

This type is immutable. To adjust cache entry options based on the result of a data fetch, use one of the Microsoft.Extensions.Caching.Hybrid.HybridCache.GetOrCreateAsync``2(System.String,``0,System.Func{``0,Microsoft.Extensions.Caching.Hybrid.HybridCacheEntryContext,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask{``1}},Microsoft.Extensions.Caching.Hybrid.HybridCacheEntryOptions,System.Collections.Generic.IEnumerable{System.String},System.Threading.CancellationToken) overloads, whose factory callback receives a mutable Microsoft.Extensions.Caching.Hybrid.HybridCacheEntryContext.

Constructors

Name Description
HybridCacheEntryOptions()

Properties

Name Description
Expiration

Gets or sets the overall cache duration of this entry, passed to the backend distributed cache.

Flags

Gets or sets additional flags that apply to the requested operation.

LocalCacheExpiration

Gets or sets the expiration for the local (in-process) cache entry.

Methods

Name Description
Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to