mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 14:11:18 -05:00
Optimize recent changes query
This commit is contained in:
@@ -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'] });
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user