We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea1017f commit 1a49882Copy full SHA for 1a49882
packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts
@@ -251,9 +251,11 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({
251
}
252
253
254
- function getCacheKey(action: any) {
+ function getCacheKey(action: any) {
255
if (isQueryThunk(action)) return action.meta.arg.queryCacheKey
256
- if (isMutationThunk(action)) return action.meta.requestId
+ if (isMutationThunk(action)) {
257
+ return action.meta.arg.fixedCacheKey ?? action.meta.requestId;
258
+ }
259
if (api.internalActions.removeQueryResult.match(action))
260
return action.payload.queryCacheKey
261
if (api.internalActions.removeMutationResult.match(action))
0 commit comments