Skip to main content
Solved

Caching offerings - how to update offerings


Nathan Zabaldo
Forum|alt.badge.img+1

I’ve updated my subscriptions/products in Google Play and restarted my app, but RevenueCat Purchases.getOfferings() never updates with updated titles, descriptions, or pricing. How do I bust the cache to get subscription/product updates?

I have a Flutter app and am running the purchases_flutter: ^3.6.0 package.

Best answer by cody

Hey @Nathan Zabaldo! 👋

The on-device cache of offerings, as well as PurchaserInfo, lasts for approximately 5 minutes. An app restart will re-fetch the latest offerings from the dashboard, or if you are calling getOfferings often, it will be refresh after that expiration. You can read more about fetching and displaying offerings here: https://docs.revenuecat.com/docs/displaying-products

View original
Did this post help you find an answer to your question?

11 replies

Nathan Zabaldo
Forum|alt.badge.img+1

They’ve updated now that I closed and reopened the emulator.


cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 497 replies
  • Answer
  • November 19, 2021

Hey @Nathan Zabaldo! 👋

The on-device cache of offerings, as well as PurchaserInfo, lasts for approximately 5 minutes. An app restart will re-fetch the latest offerings from the dashboard, or if you are calling getOfferings often, it will be refresh after that expiration. You can read more about fetching and displaying offerings here: https://docs.revenuecat.com/docs/displaying-products


Forum|alt.badge.img+3
  • New Member
  • 1 reply
  • March 17, 2023

@cody 

 

Does it make sense to put in the documentation for displaying products that there is a 5 minute cache?

 


ricsantos
Forum|alt.badge.img+1
  • New Member
  • 4 replies
  • July 26, 2023

On app launch, I get the offerings, which is async and appears to be a network call.

I’d like to have instant access to the cached offering(s), how can I do that using the iOS SDK?
 

    @objc func getOfferings(completion: @escaping (Offerings?, PublicError?) -> Void) {
        self.getOfferings(fetchPolicy: .default, completion: completion)
    }

 

I’ve looked at persisting `Offering` myself but it doesn’t appear to support Codable or serialization.

 


Forum|alt.badge.img+1
  • New Member
  • 4 replies
  • September 17, 2023

still getting old offering packages. for some reason offering packages are not fetching no matter what. (restarted app etc.)


Forum|alt.badge.img+1
  • New Member
  • 4 replies
  • September 21, 2023

finally solved the issue.
For my case it was ios and you have to sync manually from xcode storekit config file.


Forum|alt.badge.img+1
  • New Member
  • 1 reply
  • November 9, 2023

To me the caching is taking more than 5 minutes, actually is taking 1~2 hours


Forum|alt.badge.img+7
  • Dedicated Member
  • 31 replies
  • November 18, 2023

I am seeing this too.  I did add a test intro offer, which appeared, but then I have changed it, and I cannot seem to get the new intro offer to appear.  It takes a solid 5 mins

 

 


Paul Finlay
Forum|alt.badge.img+5

I think this is a pretty major issue. You should be able to pass a “skipCache” boolean or something like that when getting offerings. We are programatically updating users offering when they enter a promo code but I have to get the user to restart the app. Its certainly costing me a couple of percent in doing that!


This is clearly a cost-saving measure on revenuecat's end.

I really need to get the most up to date offerings when i run the getOfferings function, we have some important logic attached to our offerings metadata. 

Any solutions? Its 2025 and this is still causing issues


jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 240 replies
  • February 11, 2025

Hi all, we do have a method that invalidates the cache and forces a refresh. You can learn more about the invalidateCustomerInfoCache method here.

Also, please ensure you’ve enabled server notifications for both stores (Apple, Google), as this will speed up webhook and integration delivery times, reduce lag time for Charts, and, in the case of iOS, allow using our Handling Refund Requests feature.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings