Updating rtk query cache validity dynamic for same endpoint #3794
Unanswered
indranilfrontrol
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using RTK query in my application.
I've a single endpoint, there I'm passing different data in request params to load different set of data.
Now for different set of data I want to maintain different cache validity time.
I'm following this doc:
https://redux-toolkit.js.org/rtk-query/usage/cache-behavior#reducing-subscription-time-with-keepunuseddatafor
Here I've example like this.
Here I can see I have option to set
keepUnusedDataFor
in the base level and for different api endpoints we have option to changekeepUnusedDataFor
for that specific endpoint.But as I mentioned I've single endpoint but multiple query params for different set of data. So is there a option to
keepUnusedDataFor
with the query params?I mean something similar to:
Or any other approach to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions