-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GetCustomerInfoAPI
: avoid making a request if there's any `PostRece…
…iptDataOperation` in progress (#1911) Fixes [CSDK-419]. This is an improvement over the fix in #1292. In there, we avoided appending on an existing `CustomerInfoOperation` if there were any `PostReceiptDataOperation`s in progress, because those might come back with outdated entitlements. This fix removes that cache key hack, and instead *reuses* the entire response to that `PostReceiptDataOperation` by "stealing" that request's cache key. This is perfectly captured by the existing test `BackendPostReceiptDataTests.testGetsUpdatedSubscriberInfoAfterPost`, added in #1292. Amazingly enough, that test still passes with one minor change: the entire process requires one fewer API call 🎉 🐼 [CSDK-419]: https://revenuecats.atlassian.net/browse/CSDK-419?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Loading branch information
Showing
4 changed files
with
40 additions
and
39 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