-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
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
useResource 支持配置cacheOptions #31
Comments
那如果这个请求“注定”失败,就会无限请求哦,一瞬间就会刷出成千上万个HTTP请求来…… |
如果在一个场景下,重试能解决问题,建议直接在请求函数上包一下重试的逻辑就行了,也能自定义重试之间等一段时间之类的。放到组件这一层不做缓存,无限刷请求太容易出问题了 重试甚至可以用类似 |
失败了不就走renderError了吗, 目前业务场景是出错了 renderError里渲染了一个返回按钮history.navagateBack, 但是下次进来的时候希望可以重新请求,而不是用缓存结果 renderError |
能 |
有一种绕过去的办法,就是在 又或者,在 |
RenderErrorOptions 多传一个expire可行吗
|
我要做个实验, |
当请求失败时不cache结果
The text was updated successfully, but these errors were encountered: