Optimize recent changes query

This commit is contained in:
gpt-engineer-app[bot]
2025-10-30 22:40:23 +00:00
parent 8623291c62
commit 46ca1c29bc
6 changed files with 253 additions and 60 deletions

View File

@@ -94,5 +94,21 @@ export function useQueryInvalidation() {
});
}
},
/**
* Invalidate parks listing cache
* Call this after creating/updating/deleting parks
*/
invalidateParks: () => {
queryClient.invalidateQueries({ queryKey: ['parks'] });
},
/**
* Invalidate rides listing cache
* Call this after creating/updating/deleting rides
*/
invalidateRides: () => {
queryClient.invalidateQueries({ queryKey: ['rides'] });
},
};
}