Merged
Conversation
…null in DetachTokens
…tes with dependency to MemoryCache 2 fields less for MemoryCache and three for every CacheEntry
…ation and current time
|
Tagging subscribers to this area: @eerhardt, @maryamariyan Issue DetailsI've one more big improvement for the MemoryCache, but it's a little bit controversial so I decided to separate it from reducing the CacheEntry size (this PR). Main changes:
|
stephentoub
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/MemoryCache.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Outdated
Show resolved
Hide resolved
eerhardt
reviewed
Dec 1, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
Outdated
Show resolved
Hide resolved
…uteExpiration and current time" because it was causing clock to get called twice This reverts commit f84b6cb. # Conflicts: # src/libraries/Microsoft.Extensions.Caching.Memory/src/CacheEntry.cs
eerhardt
reviewed
Dec 2, 2020
src/libraries/Microsoft.Extensions.Caching.Memory/tests/CacheEntryScopeExpirationTests.cs
Show resolved
Hide resolved
eerhardt
approved these changes
Dec 2, 2020
Member
eerhardt
left a comment
There was a problem hiding this comment.
I just had one minor question on the unit test. Other than that, I think this looks good.
Member
Author
|
@eerhardt thanks a lot for the review! |
This was referenced Dec 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've one more big improvement for the MemoryCache, but it's a little bit controversial so I decided to separate it from reducing the CacheEntry size (this PR).
Changes:
_notifyCacheOfExpiration,_notifyCacheEntryCommitand_loggerfrom CacheEntry, replace it with a reference toMemoryCacheand instead of invoking delegates, invoke internal methods._isDisposed,_isExpiredand_valueHasBeenSet) with a single[Flag]field. I did this mostly because I plan to introduce another boolean flag soon.