SDK Cache

  • 17 November 2021
  • 1 reply

Badge +3

In the SDK docs it is mentioned that the SDK caches user information. What is the TTL on the cache information? How stale can the information get? If a user leaves the app in the background for a few days does the SDK refetch information when the app is opened back up?



1 reply

Userlevel 4
Badge +9

Hey @Omer Winrauke!

The cache is 5mins, so when the app fires up or getPurchaserInfo is called a network request is made if the cache is >5mins stale.

However, it’s worth noting that the PurchaserInfo in the cache is always returned first. If a network request needs to be made this is done in the background. The reason for this is so you can check the purchaserInfo as often as you need and it will always return fast, creating a synchronous experience for your customers.