Skip to content

DashScope使用DeepSeek缓存命中过低 #1944

Description

@luoshengming

这段时间用DashScope搭配DeepSeek,使用一段时间后在DeepSeek官网查看相关的模型用量,发现缓存命中基本在60%到80%之间,感觉过低,之前用Claude Code 搭配DeepSeek稳定在99%的,我看了下源码

private String buildWorkspaceSection(RuntimeContext rc) {
String agentsContent = workspaceManager.readAgentsMd(rc).strip(); // 读 AGENTS.md
String memoryContent = workspaceManager.readMemoryMd(rc).strip(); // 读 MEMORY.md ← 每次都在变!
String knowledgeContent = workspaceManager.readKnowledgeMd(rc).strip(); // 读 knowledge
// ...全拼起来塞进 system prompt
}

不知是不是因为是拼了记忆导致前缀缓存就命不中了,还是什么原因。希望能做到开箱即用时让模型调用的缓存命中再高一些。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions