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
In some situations, the backend processing of a request can take a long time or be very expensive. In this situation it would be good to be able to automatically abort requests when the response is no longer needed, either because the component using the query has been unmounted, or because the params have changed.
I imagine this would be achieved via a new option abortRedundantRequests. If set to true on a given endpoint, this would mean that the AbortSignal (which I believe is already passed through to fetchBaseQuery) gets aborted. Then the backend can listen for the connection being closed, and stop any expensive processing it might still be doing.
Is that something that would make sense for RTK to implement? Or is there any way I can achieve this already?
The text was updated successfully, but these errors were encountered:
In some situations, the backend processing of a request can take a long time or be very expensive. In this situation it would be good to be able to automatically abort requests when the response is no longer needed, either because the component using the query has been unmounted, or because the params have changed.
I imagine this would be achieved via a new option
abortRedundantRequests
. If set totrue
on a given endpoint, this would mean that the AbortSignal (which I believe is already passed through to fetchBaseQuery) gets aborted. Then the backend can listen for the connection being closed, and stop any expensive processing it might still be doing.Is that something that would make sense for RTK to implement? Or is there any way I can achieve this already?
The text was updated successfully, but these errors were encountered: