Paywalls: pre-fetch intro eligibility for paywalls#2860
Merged
Conversation
422fa87 to
aa2c521
Compare
1a808d1 to
46482ed
Compare
NachoSoto
added a commit
that referenced
this pull request
Jul 24, 2023
I noticed the order of cache updates on SDK initialization was: - `Offerings` - `ProductEntitlementMapping` - `CustomerInfo` This is inefficient because fetching `CustomerInfo` first is the most important. Also, #2860 will pre-warm intro eligibility, so we want to do that _after_ we might have potentially cleared the intro eligibility cache after a `CustomerInfo` update. _ Note: I recommend reviewing the diff ignoring whitespace._
46482ed to
2aa0300
Compare
Paywalls: pre-fetch intro eligibility for paywallsPaywalls: pre-fetch intro eligibility for paywalls
NachoSoto
commented
Jul 24, 2023
Contributor
Author
There was a problem hiding this comment.
I've changed these so they produce errors instead of crashing the test.
NachoSoto
commented
Jul 24, 2023
Contributor
Author
There was a problem hiding this comment.
This wasn't used, and it meant that we could have leaked stuff inside of these closures.
joshdholtz
approved these changes
Jul 24, 2023
aa2c521 to
23d5ad8
Compare
5c9f83c to
feb447c
Compare
23d5ad8 to
274ddb3
Compare
bf7ffbc to
9f6bb45
Compare
feb447c to
d83144b
Compare
Member
|
needs a rebase, right? |
This will help provide a better experience when launching paywalls, as hopefully we will have already computed intro eligibility by then. This is even better than when using `StoreKit` paywalls. Note that thanks to `CachingTrialOrIntroPriceEligibilityChecker` (#2007) this is cached automatically, and also it handles multiple requests with the same or different product identifiers.
NachoSoto
added a commit
that referenced
this pull request
Aug 7, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 7, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 7, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 9, 2023
NachoSoto
added a commit
that referenced
this pull request
Aug 9, 2023
Follow-up to #2860. Thanks to integration tests for catching this (#2123). 
NachoSoto
added a commit
that referenced
this pull request
Aug 9, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 11, 2023
NachoSoto
added a commit
that referenced
this pull request
Aug 11, 2023
Follow-up to #2860. Thanks to integration tests for catching this (#2123). 
NachoSoto
added a commit
that referenced
this pull request
Aug 11, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 14, 2023
NachoSoto
added a commit
that referenced
this pull request
Aug 14, 2023
Follow-up to #2860. Thanks to integration tests for catching this (#2123). 
NachoSoto
added a commit
that referenced
this pull request
Aug 14, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 17, 2023
NachoSoto
added a commit
that referenced
this pull request
Aug 17, 2023
Follow-up to #2860. Thanks to integration tests for catching this (#2123). 
NachoSoto
added a commit
that referenced
this pull request
Aug 17, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 22, 2023
… makes no API requests For `RevenueCatUI` (#2860) we're going to be pre-warming the intro eligibility. It's important to make sure that this won't make API requests.
NachoSoto
added a commit
that referenced
this pull request
Aug 24, 2023
NachoSoto
added a commit
that referenced
this pull request
Aug 24, 2023
Follow-up to #2860. Thanks to integration tests for catching this (#2123). 
NachoSoto
added a commit
that referenced
this pull request
Aug 24, 2023
This refactors #2860 extracting it to a separate type so we can easily extend it to pre-warm the image cache as well (PWL-10).
NachoSoto
added a commit
that referenced
this pull request
Aug 28, 2023
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This will help provide a better experience when launching paywalls, as hopefully we will have already computed intro eligibility by then.
This is even better than when using
StoreKitpaywalls.Note that thanks to
CachingTrialOrIntroPriceEligibilityChecker(#2007) this is cached automatically, and also it handles multiple requests with the same or different product identifiers.Depends on #2865.