mirror of https://github.com/msgbyte/tailchat
chore: default query slate
parent
8b13dfb913
commit
0a927039ff
@ -1,5 +1,11 @@
|
|||||||
import { QueryClient } from 'react-query';
|
import { QueryClient } from 'react-query';
|
||||||
|
|
||||||
const queryClient = new QueryClient();
|
const queryClient = new QueryClient({
|
||||||
|
defaultOptions: {
|
||||||
|
queries: {
|
||||||
|
staleTime: 10 * 1000, // 默认缓存10s
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
export { queryClient };
|
export { queryClient };
|
||||||
|
Loading…
Reference in New Issue