Skip to content

Conversation

stephentoub
Copy link
Member

@stephentoub stephentoub commented Jul 1, 2025

GetCacheKey already enabled augmenting the key list, but doing so required deriving a custom caching client. It appears to be a reasonably common thing to want to configure, so exposing it as a property as well.

While doing this, I also removed additional per-call allocation coming from GetCacheKey.

Closes #6550

Microsoft Reviewers: Open in CodeFlow

GetCacheKey already enabled augmenting the key list, but doing so required deriving a custom caching client. It appears to be a reasonably common thing to want to configure, so exposing it as a property as well.

While doing this, I also removed additional per-call allocation coming from GetCacheKey.
@stephentoub stephentoub requested review from a team as code owners July 1, 2025 02:35
@stephentoub stephentoub changed the title Add DistributedCachingChatClient.AdditionalCacheKeyValues Add DistributedCachingChatClient/EmbeddingGenerator.AdditionalCacheKeyValues Jul 1, 2025
@github-actions github-actions bot added the area-ai Microsoft.Extensions.AI libraries label Jul 1, 2025
Copy link
Contributor

@shyamnamboodiripad shyamnamboodiripad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

This was referenced Jul 30, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-ai Microsoft.Extensions.AI libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Add 'AdditionalCacheKeyItems' property to DistributedCachingChatClient and DistributedCachingEmbeddingGenerator
4 participants