-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
2nd call to MemoryCache.Set() with the same key erases entry if cache is full #9933
base: main
Are you sure you want to change the base?
Conversation
Learn Build status updates of commit ed0bede:
|
File | Status | Preview URL | Details |
---|---|---|---|
xml/Microsoft.Extensions.Caching.Memory/MemoryCacheOptions.xml | View | Details |
xml/Microsoft.Extensions.Caching.Memory/MemoryCacheOptions.xml
- Line 0, Column 0: [Warning: disallowed-html-tag - See documentation]
HTML tag 'see' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:
- Try searching the learn.microsoft.com contributor guides
- Post your question in the Learn support channel
Learn Build status updates of commit 60f05af: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
> [!CAUTION] | ||
> There may be transient states while the cache is full but blocks are being released on a background thread. In this state, unexpected behavior might occur if the cache is being overutilized. | ||
> | ||
> When updating an existing item with another one that will make cache size go beyond the limit, the existing and new items will be removed. |
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.
I don't know that this makes sense. Isn't "updating an existing item with another one" actually replacing an item? The wording sounds like "replace" not "update"
You can use |
Learn Build status updates of commit 27a2065: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
…
Summary
These changes document a strange behaviour (though understandable) in memory cache where existing and new entries get deleted when size limit is set and exceeded
Contributes to dotnet/runtime#36039