问一个 Agent 达到 limit 后的操作问题

6 小时 18 分钟前
 logoutC

比如临睡前达到 limit 后,是 1 )开着终端,等到明天早上继续 2 )关掉终端,明天/resume 3 )关掉终端,明天不 resume 继续

服务器端的缓存过了 8 小时还存在吗? 另外,如果达到 limit ,把网络断了一段时间,服务器端检测不到 client 还活着,会主动把缓存清掉吗?

725 次点击
所在节点    程序员
6 条回复
AlexXXXX
6 小时 1 分钟前
你说的如果是命中缓存,最多按小时算,短的 5 分钟就清空了。在想啥呢,那是实时加载到运算运存里的,不清空那不炸了吗。不是真电脑上的缓存。
iv8d
5 小时 40 分钟前
等,wait ,sleep
Krman
5 小时 16 分钟前
1.目前好像只有 deepseek 的 kv cache 是存储在硬盘上的,ds 的 kv 缓存 ttl 数小时至几天,在有效的 ttl 内,ds 是按照账户 id 来缓存的。至于开几个 session ,什么时候开 session 对 kv cache 是没有影响的。ttl 过期或者服务器强制清除缓存后,会重新开始计算 kv ;
2.claude 和 gpt 的 kv cache ttl 默认只有 5 分钟,最多可延长到 1h ( token 消耗会增加);
3.kv cache 复用是在 perfill 阶段,切记在 cc 或者其他 coding ide 上的同一 session 中不要随意切换模型( subagent 可以调用任意 llm ,独立的 context ,不会污染主 session 中的 context ,所以也不会破坏 prompt cache ),这样会导致 kv cache 复用失败(原因是不同模型在 perfill 阶段对 qkv 计算维度都不一样);
Krman
5 小时 13 分钟前
claude 和 gpt 的 kv cache 主要存储在显存和内存上,所以 ttl 较短,不像 ds 存储在硬盘上可以保存那么久。
TTL:缓存有效期。
xiaxichen
2 小时 17 分钟前
@Krman 阿里好像也加这种缓存策略了
mgcnrx11
1 小时 49 分钟前
https://developers.openai.com/api/docs/guides/prompt-caching GPT-5.5 + 不是 24 小时吗? Extended prompt cache retention keeps cached prefixes active for longer, up to a maximum of 24 hours. Extended Prompt Caching works by offloading the key/value tensors to GPU-local storage when memory is full, significantly increasing the storage capacity available for caching.

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1222251

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX