-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename lite.Retrieve() to lite.RetrieveAndRemember()
- Loading branch information
1 parent
9dfe0be
commit b3b1189
Showing
5 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
b3b1189
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.
lite.Retrieve renamed to lite.RetrieveAndRemember
Retrieve
as extension method forLite<T>
has typically used or set the internalEntity
field as cache to improve performance. Unfortunately, this optimization has sometimes unintended consequences on serialization and cache invalidation, so it was a bad idea. 😢In React there is since the beginning
fetchAndRemember
andfetchAndForget
, so it's about time to do the same in C#. NowRetrieveAndRemember
uses the cache (oldRetrieve
behaviour), whileRetrieveAndForget
(untouched) does a database access every time and doesn't modify theEntity
field.How to update