-
Notifications
You must be signed in to change notification settings - Fork 651
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
Move serialization outside of cache lock #5101
Conversation
@ashare80: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
👷 Deploy request for apollo-android-docs pending review.Visit the deploys page to approve it
|
import com.apollographql.apollo3.api.json.MapJsonReader | ||
import com.apollographql.apollo3.cache.normalized.api.CacheKey | ||
|
||
data class CacheDataTransformer<D: Executable.Data>( |
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.
data class CacheDataTransformer<D: Executable.Data>( | |
internal class CacheDataTransformer<D: Executable.Data>( |
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.
One minor suggestion, LGTM otherwise, Thanks for the contribution!
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!
I missed this before but indeed To keep the return type of
|
faf20d8
to
946c7d2
Compare
Thanks again for the contribution! @BoD @ashare80, I pushed a few changes to:
All in all, I think the Let me know what you think. |
@martinbonnin Awesome thanks! |
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.
This looks good to me 👍
Lock blocks reads and writes during processing of data before and after accessing cache unnecessarily.