Looking for documentation on client.cache.reset()

I’m upgrading an application from apollo-client v2 to v3. I think I’ve covered everything addressed in the migration guide and changelog. I’m now trying to resolve an issue which I believe is caused by our use of client.cache.reset(). I’m looking for documentation for this method, for either v2 or v3, but I’m not finding anything. Is this method documented anywhere? Or is it not intended to be used by users of apollo-client?

Specifically, I would like to know is:
a) How is this method different from client.resetStore()?

b) How has it’s behavior changed from v2 to v3?
Based on running our application, it appears that client.cache.reset() refetches queries in v3, but it did not in v2. This is causing unexpected behavior.

c) Can I simply replace client.cache.reset() with client.clearStore()?
Given the above observation about refetched queries, it sounds like .clearStore() is what we need. But, given that I cannot find documentation for .reset(), I figured I should ask.

Hello! The recommended APIs for clearing the Apollo Client cache are indeed client.resetStore and client.clearStore, which are defined here and (briefly) documented here.

Both of these methods call QueryManager.clearStore(), which in turn calls cache.reset. Importantly, cache.reset is called after performing logic around in-flight and active queries (the lack of which might have caused the refetching behavior you observed with calling cache.reset directly).

All of this is to say, replacing cache.reset with client.clearStore sounds perfect if you don’t want to refetch after the reset!

Thank you for the clarification!