Class CacheEntry
What the cache stores for one key: the body, its content type and the headers the entry may carry.
A hit hands the entry to another exchange, so the headers are what the miss produced (the scope) or
what a put named, never what an exchange came in with and never a credential
().
public sealed class CacheEntry
Inheritance
Properties
Body
Cached body (a CLR object in the in-process cache; restored to its type from a distributed cache when possible).
public object? Body { get; init; }
FromOut
The miss left its result in exchange.Out (a request-reply producer such as HTTP replies
public bool FromOut { get; init; }
Headers
Headers of the result message: set on In on a hit, or on the reply when .
public IReadOnlyDictionary<string, object?>? Headers { get; init; }
InHeaders
With : the headers the inner steps produced on In while replying in Out; a hit sets them on In.
public IReadOnlyDictionary<string, object?>? InHeaders { get; init; }
RemovedHeaders
Names of the headers the inner steps removed from In; a hit removes them as well.
public IReadOnlyCollection<string>? RemovedHeaders { get; init; }
Methods
ApplyTo(IExchange)
Writes the entry where the miss left it: a fresh Out when the inner steps replied there,
public void ApplyTo(IExchange exchange)
ApplyTo(IMessage)
Writes the entry into the message. Cached headers overwrite the current ones: that is what the
public void ApplyTo(IMessage message)
From(IMessage, bool, bool)
Captures the message with its headers as they are, credentials excluded. The scope and the
public static CacheEntry From(IMessage message, bool includeHeaders, bool fromOut = false)