# 错误：fetch 使用了 'no-store' 与 'use cache' 指令冲突

- **ID:** `nextjs/use-cache-no-store-fetch`
- **领域:** nextjs
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

当组件或函数使用 'use cache' 指令启用缓存，但内部的 fetch 调用使用了 'cache: no-store' 时，Next.js 会抛出错误，因为两种缓存策略不兼容。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| next@15.0.0 | active | — | — |
| next@15.1.0 | active | — | — |

## 解决方案

1. ```
   从 fetch 调用中移除 'cache: no-store'，依赖 'use cache' 指令的缓存行为。如果需要新鲜数据，使用 'next: { revalidate: 0 }' 等重新验证选项。
   ```
2. ```
   将 fetch 调用移到 'use cache' 作用域之外，提取到没有该指令的单独函数中。
   ```

## 无效尝试

- **** — This disables caching for the entire component, which may degrade performance and is not always necessary. (60% 失败率)
- **** — This forces caching even when fresh data is needed, leading to stale responses. (80% 失败率)
