Skip to content
Tracon

ResponseCacheSettings

Namespace Tracon · Assembly Tracon.Abstractions.dll

Response caching settings for a ModelBinding.

public sealed record ResponseCacheSettings : IEquatable<ResponseCacheSettings>

objectResponseCacheSettings

IEquatable<ResponseCacheSettings>

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

Disabled by default: with no cache configured, today’s behavior is preserved exactly — every call reaches the model, and no cache ring is added to the pipeline.

The cache key is tenant-, provider- and tool-set-aware; it is not the raw key Microsoft.Extensions.AI.DistributedCachingChatClient computes on its own. Two agents with a different AgentDefinition.ToolNames never share a cached response.

public ResponseCacheSettings()

Gets whether the cache ring is added to the pipeline.

public bool Enabled { get; init; }

bool

Gets how long a cached response stays valid.

public TimeSpan Lifetime { get; init; }

TimeSpan

A model version can change under the same name, and a cache hit skips the content guard (it never reaches the model call it would inspect); this bounds both risks to a limited window instead of leaving a cached response valid forever.

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(ResponseCacheSettings? other)

other ResponseCacheSettings?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(ResponseCacheSettings?, ResponseCacheSettings?)

Section titled “ operator ==(ResponseCacheSettings?, ResponseCacheSettings?)”
public static bool operator ==(ResponseCacheSettings? left, ResponseCacheSettings? right)

left ResponseCacheSettings?

right ResponseCacheSettings?

bool

operator !=(ResponseCacheSettings?, ResponseCacheSettings?)

Section titled “ operator !=(ResponseCacheSettings?, ResponseCacheSettings?)”
public static bool operator !=(ResponseCacheSettings? left, ResponseCacheSettings? right)

left ResponseCacheSettings?

right ResponseCacheSettings?

bool