Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Caching tree data to improve performance and reduce disk read operations https://github.com/siyuan-note/siyuan/issues/16961

Danielfb7e24161a0e
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index deb07eb2b0..0a986eb2e1 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -936,6 +936,7 @@ func RenameAsset(oldPath, newName string) (newPath string, err error) {
return
}
+ cache.RemoveTreeData(util.GetTreeID(treeAbsPath))
p := filepath.ToSlash(strings.TrimPrefix(treeAbsPath, filepath.Join(util.DataDir, notebook.ID)))
tree, parseErr := filesys.LoadTreeByData(data, notebook.ID, p, luteEngine)
if nil != parseErr {