# OpenAI API 支持 12 小时 prompt 缓存,Codex 与 Work 用户缓存永久保留
> 原标题:Day 16/
- 来源:Tibo
- 发布时间:2026-10-21T01:10:02.000Z
- AIHOT:https://aihot.news/items/gf3h1rt1vsjw3dnw4hxlie3fv
- 原文:https://x.com/thsottiaux/status/2112712984644784534
## 摘要
OpenAI 开发者账号宣布 API 现已可选 12 小时 prompt 缓存,持续运行的智能体可在请求间隔数小时的情况下继续以更低的缓存输入费率复用指令、工具和上下文。Tibo 补充称,Codex 与 Work 中已登录用户的缓存会永久保留,返回旧对话或数小时后恢复会话保证命中缓存,且无额外惩罚。
## 推荐理由
作者亲述 API 12 小时缓存与 Codex、Work 侧持久缓存策略,可直接判断对长时间运行 Agent 成本和体验的影响。
## 正文
Day 16/
You can now cache for 12h in the API and for logged in users across Codex & Work we keep cache forever and you don’t have any penalty for coming back to an old conversation or resuming after a few hours and are now guaranteed to hit the cache.
## 中文译文
第16天/
现在你可以在 API 中缓存 12 小时,而对于 Codex 和 Work 的已登录用户,我们会永久保留缓存,你回到旧对话或几小时后恢复对话都不会有任何惩罚,并且现在保证能命中缓存。
## 引用 @OpenAIDevs
> You can now choose 12-hour prompt caching in the API.
>
> Persistent agents, like dots, reuse context throughout the day.
>
> You can keep shared instructions, tools, and context cached longer and pay the lower cached-input rate, even when requests are hours apart.
https://x.com/OpenAIDevs/status/2112603916076781778
### 引用中文译文
> 你现在可以在 API 中选择 12 小时提示缓存。
>
> 持久化 agent(如 dots)会在一天中重复使用上下文。
>
> 你可以将共享的指令、工具和上下文缓存更长时间,并支付更低的缓存输入费率,即使请求相隔数小时。