-
Notifications
You must be signed in to change notification settings - Fork 779
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
HybridCache : implement the tag expiration feature #5748
Conversation
Getting ready for 8.10 release ---- #### AI description (iteration 1) #### PR Classification Release preparation #### PR Summary This pull request updates dependencies and configurations in preparation for the 8.10 release. - `/eng/Version.Details.xml`: Updated various dependencies to newer versions. - `/eng/Versions.props`: Synchronized dependency versions with the latest updates. - `/azure-pipelines.yml`: Removed the `codecoverage` stage. - `/eng/pipelines/templates/BuildAndTest.yml`: Added steps to set up private feed credentials for both Windows and non-Windows agents.
Getting ready for our 9.0-preview9 release ---- #### AI description (iteration 1) #### PR Classification Dependency update #### PR Summary This pull request updates the project to use RC2 versions of ASP.NET Core and runtime dependencies. - Updated dependency versions in `/eng/Version.Details.xml` and `/eng/Versions.props` to RC2. - Removed code coverage stage from `azure-pipelines.yml`. - Added setup for private feeds credentials in `/eng/pipelines/templates/BuildAndTest.yml`. - Disabled NU1507 warning in `Directory.Build.props`. - Modified `NuGet.config` to include `dotnet9-internal` feed and removed package source mappings.
…001.3 (dotnet#5468) [main] Update dependencies from dotnet/arcade
…0241001.7 (dotnet#5469) [main] Update dependencies from dotnet/aspnetcore
…003.2 (dotnet#5475) [main] Update dependencies from dotnet/arcade
…0241007.7 (dotnet#5477) Microsoft.AspNetCore.App.Ref , Microsoft.AspNetCore.App.Runtime.win-x64 , Microsoft.AspNetCore.Mvc.Testing , Microsoft.AspNetCore.TestHost , Microsoft.Extensions.Caching.SqlServer , Microsoft.Extensions.Caching.StackExchangeRedis , Microsoft.Extensions.Diagnostics.HealthChecks , Microsoft.Extensions.Http.Polly , Microsoft.Extensions.ObjectPool From Version 9.0.0-rtm.24501.7 -> To Version 9.0.0-rtm.24507.7 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Steve Sanderson <SteveSandersonMS@users.noreply.github.com> Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com> Co-authored-by: luisquintanilla <Luis.Quintanilla@microsoft.com>
…et#5485) * Flip default on FunctionInvokingChatClient.ConcurrentInvocation For better reliability, default ConcurrentInvocation to false, so that it doesn't introduce concurrency / parallelism where there wasn't any. * Update src/Libraries/Microsoft.Extensions.AI/ChatCompletion/FunctionInvokingChatClient.cs Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com> --------- Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>
…re] (dotnet#5492) Given implementation details of the JSON source generator today, even with the converter applied to these properties, code is still being generated for Exception, leading to unsuppressable trimmer warnings.
Contributes to dotnet#4656
* doc updates * Update src/Libraries/Microsoft.Extensions.Caching.Hybrid/HybridCacheOptions.cs --------- Co-authored-by: Igor Velikorossov <RussKie@users.noreply.github.com>
The underlying native schema support in OpenAI has specific requirements on valid schema names, as shown in the following exception when using either an array or any other generic type: ``` Unhandled exception. System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: invalid_value) Parameter: response_format.json_schema.name Invalid 'response_format.json_schema.name': string does not match pattern. Expected a string that matches the pattern '^[a-zA-Z0-9_-]+$'. at OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options) ``` This fix follows the approach used to sanitize function names, and sanitizes the schema name the same way. Fixes dotnet#5501
Removed partial due error S2333 being shown otherwise.
…009.3 (dotnet#5506) [main] Update dependencies from dotnet/arcade
Makes it consistent with OpenAI. Test-only change.
* Bump code coverage * Break builds only if coverage drops for 100% projects
* Update to public versions * Update NuGet.config
…override a transitive dependency (dotnet#5755)
I am not sure Console.WriteLine(TimeProvider.System.GetTimestamp());
Console.WriteLine(TimeProvider.System.GetUtcNow());
Console.WriteLine(System.Runtime.InteropServices.RuntimeInformation.OSDescription);
|
@sebastienros thanks, great catch! I incorrectly assumed that this was a defined value like epoch ticks or something. Apparently not. I'll rework that into something reliable. |
There is TimestampFrequency, but I will change to use GetUtcNow() instead. |
Use ticks (but same normalization issue) or a sortable numeric format (yyyymmddhhmmssxxxx), or use an EPOCH so 0 starts at 1/1/2025 ;) then numbers are much smaller. |
I considered that - if you think it won't be contentious, sure I can use an atypical epoch. At stackoverflow, we used "stack seconds" in a few key places :) however, the fixed size is highly desirable, and I'd rather not get into 32-bit pain. Honestly, I think it is better to just pay for 64 and not worry about it. |
FWIW |
rebase went really, really freaky; trying to resolve, but it might be easier to re-branch and copy just the HC bits |
moving to #5781 due to rebase fail re the |
Implement tag expiration in
HybridCache
The
HybridCache
system has a "tags" feature; rather than building a bespoke per-backend secondary index (like how the redis OutputCache backend works), here we move everything into the core library:DefaultHybridCache
, we maintain a map of tags (string
, note*
means everything) to expirations, and we track the creation time against eachCacheItem
Because the tag fetches are async, the data in the lookup is not
(timestamp)
, it isTask<(timestamp)>
Outstanding:
Microsoft Reviewers: Open in CodeFlow