There's a cache that's slowing me to a grind

Badge +4
I’m working on integrating rc to my WebRTC signaling server and it’s hard. Last evening, I deleted all the users from revenuecat and flushed the server’s db.  This morning I subscribed and got an event with the userId from yesterday 🪦 I’m using 💯capacitor-purchases 💯 but I don’t believe it has a cache.
Are all caches disabled for sandbox users?


2 replies

Userlevel 4
Badge +8



Can you explain a little more about your purchases flow? We don’t disable the cache in sandbox. Here’s a relatively new doc on caching if you want to learn more.

Badge +4

Sure, here’s the flow. The client shows the user the offering and once he decided to buy, he’s sent to the store. Then the client gets an event with a fresh subscription. The server webhook is also getting called and the server stores the temp id. If the client receives a temp ID, it sends the server a registration request with the temp id for authorization. The server replies with a QR code to be scanned by an authenticator app to generate a OTP. The OTP is sent back to the server and the server generates a new permanent user ID and add it to the reply, the client then uses it to login to RevenueCat.

As I’m developing this flow and I often need to reset and start fresh: cancel the subscription of the sandbox user, remove the user from RC and clear my server’s DB. When RC returns the user ID from its cache the client behaves differently as it’s not a temp ID. The server doesn’t recognize it as I flushed the db and I can’t test the scenario of a fresh user.