-
Notifications
You must be signed in to change notification settings - Fork 601
Add DistributedCacheEventStreamStore
#1136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Extensions.AI.Abstractions" /> | ||
| <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" /> | ||
| <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is ModelContextProtocol.Core the right assembly for this, or should it instead live in ModelContextProtocol or ModelContextProtocol.AspNetCore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could probably live in ModelContextProtocol.AspNetCore for the sake of minimizing dependencies in the .Core project.
src/ModelContextProtocol.Core/Server/DistributedCacheEventIdFormatter.cs
Show resolved
Hide resolved
| // Base64-encode session and stream IDs so the event ID can be parsed | ||
| // even if the original IDs contain the ':' separator character | ||
| var sessionBase64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(sessionId)); | ||
| var streamBase64 = Convert.ToBase64String(Encoding.UTF8.GetBytes(streamId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate from this PR, we should really add Base64 overloads that handle this without the intermediate byte[]. I will follow up.
src/ModelContextProtocol.Core/Server/DistributedCacheEventStreamStore.cs
Outdated
Show resolved
Hide resolved
e01c4f4 to
80b2cb4
Compare
Opening initially as a draft until #1077 gets merged