Skip to content
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

[Bug]: useRequest 的 force 配置使用异常 #624

Closed
2 tasks done
TianQian-A opened this issue Jan 6, 2025 · 1 comment
Closed
2 tasks done

[Bug]: useRequest 的 force 配置使用异常 #624

TianQian-A opened this issue Jan 6, 2025 · 1 comment
Assignees
Labels
bug:confirmed Something isn't working lang:chinese This issue uses Chinese

Comments

@TianQian-A
Copy link

这是否是一个 Bug?

  • 我已经确认我要报告的是一个 Bug

这个问题是否已经存在?

  • 我已经确认这个 Issue 没有被报告过

Alova 版本

3.2.7

前端框架

Vue

问题描述

当 method 的缓存模式为 restore ,且使用 useRequest 配置 forcetrue 时,会跳过 l1Cache 的检查,但仍会执行 l2Cache 的检查。

期望的表现

根据阅读文档的理解,预期应该跳过所有的缓存检查。

复现链接

No response

复现步骤

const method = alovaInst.Get('/user/profile', {
  // ...
  cacheFor: {
    mode: 'restore',
    expire: 1000 * 60 * 60 * 24
  }
})
useRequest(method, {
  {
    force: true
  }
});

系统信息

No response

补充说明

No response

@TianQian-A TianQian-A added bug:need-confirm It's probably a bug lang:chinese This issue uses Chinese labels Jan 6, 2025
@MeetinaXD MeetinaXD added bug:confirmed Something isn't working and removed bug:need-confirm It's probably a bug labels Jan 7, 2025
@MeetinaXD
Copy link
Contributor

👍🏼 感谢,已复现!应该是漏了条件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:confirmed Something isn't working lang:chinese This issue uses Chinese
Projects
None yet
Development

No branches or pull requests

3 participants