Files
myWiki/concepts/cache-cold-start.md
2026-06-01 10:46:01 +08:00

33 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Cache Cold-Start (缓存冷启动)"
created: 2026-05-29
updated: 2026-05-29
type: concept
tags: ["distributed-systems", "caching", "LLM", "latency"]
sources: ["https://mp.weixin.qq.com/s/MUWV7eug14bktUMlqsxfQw"]
---
# Cache Cold-Start (缓存冷启动)
**Cache Cold-Start** 指在分布式 [[distributed-prompt-caching]] 环境中,当一个 Agent 节点尝试接入已有会话但本地无前缀缓存时,必须跨越网络重新传输全部历史 Token 并触发 LLM 端完整前缀重算的现象。
## 在量化交易中的影响
典型场景:信号挖掘节点已积累 150k Token 的热上下文 → 高波动行情触发横向扩展 → 验证节点发起首次 API 调用 → 发生 Cache Cold-Start
- **网络传输**:物理上重新发送 150k Token
- **计算重算**LLM 服务端完整前缀重算(数秒)
- **后果**:信号时效性彻底丧失
## 解决方案
1. **主动预热**[[active-cache-warmup]]):在需要前通过 Shadow Calling 预填充缓存
2. **分布式路由**[[distributed-cache-routing]]):通过 Redis 路由表查询热节点位置
3. **降级策略**[[context-pruning]]):冷启动不可避时,裁剪上下文至最小可接受范围
## 相关
- [[distributed-prompt-caching]] — 分布式缓存体系
- [[shadow-calling]] — 消除冷启动的核心机制
- [[context-pruning]] — 冷启动时的降级方案