-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix PostEvictionCallbacks bug #46807
Conversation
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue DetailsExplanation: after #45962 the runtime/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.CacheEntryTokens.cs Line 38 in 6b4c1ad
And it was causing a silent error after performing an invalid cast as a part of the scheduled task: runtime/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs Lines 207 to 209 in dfc70d1
Fixes #46774
|
src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Caching.Memory/tests/TokenExpirationTests.cs
Outdated
Show resolved
Hide resolved
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.
LGTM. Thanks for getting the fix up so quick.
I just had a couple minor test suggestions.
- remove the dependency to TaskTimeoutExtensions - don't wait 1s, call Cancel in explicit way
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.
Thanks for the quick fix!
Explanation: after #45962 the
this
keyword was not referring to an instance of theCacheEntry
type:runtime/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.CacheEntryTokens.cs
Line 38 in 6b4c1ad
And it was causing a silent error after performing an invalid cast as a part of the scheduled task:
runtime/src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Lines 207 to 209 in dfc70d1
Fixes #46774