State Management · Middle · Question 35 of 75

When does RTK Query remove unused data from its cache?

Explanation

RTK Query counts hook subscriptions per endpoint and argument. If something subscribes again within that time, data comes from the cache. The TanStack Query counterpart is gcTime.

Further reading

Problem with a question

State Management · Middle · question 35

Test yourself

Take the State Management · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz