Skip to main content
Question

How to clear offerings cache or force load current offering for a user

  • September 22, 2025
  • 3 replies
  • 94 views

Oleh
Forum|alt.badge.img+5

In my app’s onboarding flow a user can claim a referral code, which changes their offering via WinWinKit. On the next step of onboarding purchase screen is shown, but the old offering is shown.

I figured that offerings are loaded and cached at initialization of the SDK, but why can’t I clear the cache or force load them?

I tried using invalidateCustomerInfoCache and checked its implementation, but it won’t do the thing.

Also found similar questions in the community, both marked as resolved, but can’t find a solution for myself.
 

This post has been closed for comments

3 replies

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • September 24, 2025

Hey ​@Oleh,

The SDK caches and updates data in a few cycles. It updates this cache as so:

  • 5 minutes with the app in the foreground
  • 25 hours with the app in the background
  • a purchase is made or restored

But you can force this refresh indeed. In order to get the latest/fresh data for CustomerInfo, you can do this in a few ways:

  • invalidateCustomerInfoCache(), but then afterwards you need to call Purchases.shared.customerInfo() again to get the latest available data;
  • or call the customer info based on the Fetch Policy directly, like so: Purchases.shared.customerInfo(fetchPolicy: .fetchCurrent)

Can you see if that helps? If not, could you share the SDK Debug Logs you get when doing so? If you prefer, feel free to share those via a support ticket and link this thread too for extra context.


Oleh
Forum|alt.badge.img+5
  • Author
  • Member
  • October 1, 2025

Thanks for the answer!


I have tried both, and was not able to refresh the current offering for the user. From digging into your SDK implementation it seems that offerings are cached separately from the customer info?

Also, this has become a smaller issue for now, because I solved it in a different way - by querying for the offering I need by its id.


guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • October 7, 2025

Hey ​@Oleh ,

Thanks for that follow up - and apologies for that misdirect on my part!

The SDK intentionally caches offerings to reduce network dependency and improve performance, but this means you can't force an immediate refresh like you can with CustomerInfo.

Offerings don't persist between app launches though, so restarting the app is the most reliable way to get fresh offerings:

Products are automatically fetched and cached when the *Purchases SDK* is configured, so in most cases the `getOfferings()` method will return synchronously. For this reason, it's safe to call `getOfferings()` as often as needed, knowing it will read from the cache without a network call.

 

These will be cached if nothing has changed in them since the last call to `getOfferings()`, or after 5 minutes.

More context here