Skip to content
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

Unify caching offerings and updating update timestamp #1206

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

tonidero
Copy link
Contributor

Description

Unifies caching offerings and updating the offerings cache timestamp to simplify things, as suggested in #1204 (comment)

@tonidero tonidero added the refactor A code change that neither fixes a bug nor adds a feature label Aug 23, 2023
@tonidero tonidero force-pushed the unify-offerings-cache-to-cache-timestamp branch from 9550a4d to cc3e3f0 Compare August 23, 2023 14:58
@tonidero tonidero force-pushed the unify-offerings-cache-to-cache-timestamp branch from cc3e3f0 to e5dd1e2 Compare August 23, 2023 15:01
@@ -407,62 +407,6 @@ class OfferingsManagerTest {
verify(exactly = 1) { cache.clearOfferingsCacheTimestamp() }
}

@Test
fun `getOfferings marks offerings cache timestamp upon success`() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests don't make sense now, and we have other tests verifying we are caching offerings.

@tonidero tonidero marked this pull request as ready for review August 23, 2023 15:04
@tonidero tonidero requested a review from a team August 23, 2023 15:04
@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #1206 (e5dd1e2) into main (fcf8b2e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1206      +/-   ##
==========================================
+ Coverage   85.87%   85.89%   +0.01%     
==========================================
  Files         183      183              
  Lines        6252     6251       -1     
  Branches      910      910              
==========================================
  Hits         5369     5369              
+ Misses        537      536       -1     
  Partials      346      346              
Files Changed Coverage Δ
...cat/purchases/common/offerings/OfferingsManager.kt 83.60% <ø> (-0.27%) ⬇️
...uecat/purchases/common/offerings/OfferingsCache.kt 100.00% <100.00%> (+7.69%) ⬆️

@tonidero tonidero merged commit 8300263 into main Aug 24, 2023
7 checks passed
@tonidero tonidero deleted the unify-offerings-cache-to-cache-timestamp branch August 24, 2023 07:53
This was referenced Aug 30, 2023
tonidero pushed a commit that referenced this pull request Aug 31, 2023
**This is an automatic release.**

### Dependency Updates
* Bump fastlane-plugin-revenuecat_internal from `b2108fb` to `a297205`
(#1210) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Rename `queue` initiation source to `unsynced_active_purchases`
(#1214) via Toni Rico (@tonidero)
* Send `initiation_source` in post receipt requests (#1212) via Toni
Rico (@tonidero)
* CustomEntitlementComputation: Add `restorePurchases` (#1211) via Toni
Rico (@tonidero)
* Unify caching offerings and updating update timestamp (#1206) via Toni
Rico (@tonidero)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A code change that neither fixes a bug nor adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants