-
Notifications
You must be signed in to change notification settings - Fork 316
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
CachingProductsManager
: use partial cached products
#2014
Merged
Merged
Conversation
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
NachoSoto
force-pushed
the
products-manager-reuse-cached-products
branch
from
November 3, 2022 22:11
4dcc5df
to
1e3fd8e
Compare
tonidero
reviewed
Nov 8, 2022
tonidero
approved these changes
Nov 8, 2022
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.
I think this works!
#1907 introduced this `CachingProductsManager` abstraction, but simply copied the existing caching mechanism, which was very limited. This expands on it by not ignoring cached products when not _all_ requested products are found. Instead, it uses the partial cache hit, and requests the rest of products. This performance optimization is illustrated in the test change, as the second request only fetches the missing product now.
NachoSoto
force-pushed
the
products-manager-reuse-cached-products
branch
from
November 8, 2022 17:19
c3ff43e
to
f2f3fa2
Compare
NachoSoto
pushed a commit
that referenced
this pull request
Nov 9, 2022
**This is an automatic release.** ### Bugfixes * `ISO8601DateFormatter.withMilliseconds`: fixed iOS 11 crash (#2037) via NachoSoto (@NachoSoto) * Changed `StoreKit2Setting.default` back to `.enabledOnlyForOptimizations` (#2022) via NachoSoto (@NachoSoto) ### Other Changes * `Integration Tests`: changed weekly to monthly subscriptions to work around 0-second subscriptions (#2042) via NachoSoto (@NachoSoto) * `Integration Tests`: fixed `testPurchaseWithAskToBuyPostsReceipt` (#2040) via NachoSoto (@NachoSoto) * `ReceiptRefreshPolicy.retryUntilProductIsFound`: default to returning "invalid" receipt (#2024) via NachoSoto (@NachoSoto) * `CachingProductsManager`: use partial cached products (#2014) via NachoSoto (@NachoSoto) * Added `BackendErrorCode.purchasedProductMissingInAppleReceipt` (#2033) via NachoSoto (@NachoSoto) * `PurchaseTesterSwiftUI`: replaced `Purchases` dependency with `SPM` (#2027) via NachoSoto (@NachoSoto) * `Integration Tests`: changed log output to `raw` (#2031) via NachoSoto (@NachoSoto) * `Integration Tests`: run on iOS 16 (#2035) via NachoSoto (@NachoSoto) * CI: fixed `iOS 14` tests Xcode version (#2030) via NachoSoto (@NachoSoto) * `Async.call`: added non-throwing overload (#2006) via NachoSoto (@NachoSoto) * Documentation: Fixed references in `V4_API_Migration_guide.md` (#2018) via NachoSoto (@NachoSoto) * `eligiblePromotionalOffers`: don't log error if response is ineligible (#2019) via NachoSoto (@NachoSoto) * Runs push-pods after make-release (#2025) via Cesar de la Vega (@vegaro) * Some updates on notify-on-non-patch-release-branches: (#2026) via Cesar de la Vega (@vegaro) * Deploy `PurchaseTesterSwiftUI` to TestFlight (#2003) via NachoSoto (@NachoSoto) * `PurchaseTesterSwiftUI`: added "logs" screen (#2012) via NachoSoto (@NachoSoto) * `PurchaseTesterSwiftUI`: allow configuring API key at runtime (#1999) via NachoSoto (@NachoSoto)
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.
#1907 introduced this
CachingProductsManager
abstraction, but simply copied the existing caching mechanism, which was very limited. This expands on it by not ignoring cached products when not all requested products are found. Instead, it uses the partial cache hit, and requests the rest of products.This performance optimization is illustrated in the test change, as the second request only fetches the missing product now.