通过将 OpenClaw 的系统提示缓存时间从 5 分钟延长至 1 小时来优化成本。

部署运维📅 2026/04/06
#API#开发者#LLM 经济#低风险#Mac mini#手动触发#可复用#半自动#代码仓库#成本优化#日志#缓存策略
just found out something about openclaw.

by default it caches your system prompt every 5 minutes. fine for most people. but if you use it religiously like me, you can flip one config field and extend it to 1 hour.

i run 67 agents from a Mac mini all workers are cheap/local models and main brain opus of course. every message rebuilds 237k tokens of context. thats $3.56 per call on opus just to load the system prompt. before the model even reads your question.

the math on a 10 message session (bursts throughout the hour):

uncached = $35.60
5 min cache = ~$18.40 (rebuilds every coffee break)
1 hour cache = $10.36 (one rebuild, then 90% off all hour)

5 min saves you ~48%.
1 hour saves you ~70%.

same model. same context. same answers. one config flag.

most people running AI systems dont realise the API has levers like this. theyre just paying full price and wondering why their bill is melting.