HybridCacheEntryContext Class

Definition

Provides a mutable view of the cache entry options in effect for a single HybridCache operation, supplied to a factory callback so that it can adjust those options based on the result of the data fetch.

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

Remarks

When a HybridCache implementation constructs the context for a factory callback, it seeds the properties from the effective options for the operation (composed from the per-call and any global options), so the factory observes the current values and can change them to influence how the resulting value is cached. A context constructed directly reflects only whatever HybridCacheEntryOptions were supplied to its constructor. Implementations can use Revision to detect whether the factory changed any value.

Constructors

Name Description
HybridCacheEntryContext(HybridCacheEntryOptions)

Initializes a new instance of the HybridCacheEntryContext class, seeding its values from the supplied options.

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.

LocalSize

Gets or sets the size to assign to entries in the local (in-process) cache.

Revision

Gets a value that increments whenever a property on this instance is changed.

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