-
Notifications
You must be signed in to change notification settings - Fork 836
Labels
area-aiMicrosoft.Extensions.AI librariesMicrosoft.Extensions.AI libraries
Description
An outcome from TM review.
In docs for UseCache
/UseDistributedCache
:
- This middleware doesn't guarantee that all data will be retained when responses are served from cache. Since we JSON-serialize everything for cache storage, we can only preserve things that round-trip through JSON.
- For example
RawResponse
objects will usually not be preserved - Likewise,
AdditionalProperties
entries will usually be rehydrated asJsonElement
values instead of whateverint
/string
/etc values they were originally
So altogether it's up to app developers to not rely on accessing data that can't be preserved through JSON serialization when using caching.
Metadata
Metadata
Assignees
Labels
area-aiMicrosoft.Extensions.AI librariesMicrosoft.Extensions.AI libraries