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

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-10 09:32:13 +08:00
parent 6c60df3d55
commit fb7e24161a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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 {