| So I've been doing some investigation and it turns out it is quite tricky to properly clear the Apollo cache especially when using apollo-cache-persist. It looks like the discussion in this issue is the most comprehensive solution for ensuring Apollo's in memory cache and the persisted cache are both cleared properly on logout. Note that in the original solution posted, `resetStore` is suggested but there is now a `clearStore` method which performs the same thing without any refetching. I think this task will actually require a little more work than we thought. I think we will need to switch from using persistCache to using the CachePersistor class when we set up our apollo client within the JS sdk. We will possibly need to expose that cache persistor object directly, or expose some method that allows us to call into the `purge` function provided by the CachePersistor. Wojciech TrockiStephen CoadyDaniel Passos would love to get your thoughts on this at some stage. |