Open SimpleCreations opened 1 year ago
you could create a version field that is not cached by configuring a CachePersistor. you can then manually manage caching the version in local storage, and if the version updates, clear the cache (or parts of the cache). alternatively, your proposed solution of clearing the cache manually when you encounter an error on the client seems like your best bet.
Let's say I'm using React + Apollo + apollo-cache-persist with a GraphQL backend. Here's the problem:
In this scenario, the users are stuck with a failing web app/crashing mobile app, and the only solution (once a fix to the backend is pushed) for them is to clear their site data/reinstall the app.
What's the recommended way to solve this? One idea I had so far is to catch render issues with an error boundary and clear the persisted cache in this case.