We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { loading, run } = useRequest( (data) => request('./API/api/resrce/query', { method: 'POST', timeout: 90000, data: { resourceCode: '1103', parameter: { ...data } } }), { manual: true, throttleInterval: 500, cacheKey: 'TextQuest', staleTime: 300000, onSuccess(data) { } } );
设置了 cacheKey: 'TextQuest', cacheTime: 300000,
但是在5分钟内, 再次请求还是 发起了网络请求, 仿佛缓存没有生效, 这是因为什么?
The text was updated successfully, but these errors were encountered:
可以放在代码块里面吗,看起来更清楚一点
Sorry, something went wrong.
No branches or pull requests
const { loading, run } = useRequest(
(data) =>
request('./API/api/resrce/query', {
method: 'POST',
timeout: 90000,
data: {
resourceCode: '1103',
parameter: {
...data
}
}
}),
{
manual: true,
throttleInterval: 500,
cacheKey: 'TextQuest',
staleTime: 300000,
onSuccess(data) { }
}
);
设置了 cacheKey: 'TextQuest',
cacheTime: 300000,
但是在5分钟内, 再次请求还是 发起了网络请求, 仿佛缓存没有生效, 这是因为什么?
The text was updated successfully, but these errors were encountered: