You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the functional key is replaced by a key filter function. That's the better way than cache.clear because it could keep the state sync with the actual cache provider. We don't recommend to manipulate the cache directly in the codebase.
The v2 docs are still in progress, the more details about the mutate API change are in PR #1989 or RFC #1946
The idea was to leverage the existing mutate API but extend the ability to partially mutat selected keys. That example calls means: Use () => true as a filter is to match all the existing keys and mutate them to undefined, without revalidation.
We'll give more examples about that change in v2 docs later.
Hi! 👋
In the documentation it is specified that you can clear the cache here using:
However,
clear
is not included in theCache
interface. This is a patch I have been using.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: