Skip to content

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

:zap: 改进打开虚拟引用后加载文档的性能 https://github.com/siyuan-note/siyuan/issues/7378

Liang Dingef029d4dea33
diff --git a/kernel/model/virutalref.go b/kernel/model/virutalref.go
index 510f2bab81..9ab2658856 100644
--- a/kernel/model/virutalref.go
+++ b/kernel/model/virutalref.go
@@ -48,8 +48,8 @@ var virtualBlockRefCache, _ = ristretto.NewCache(&ristretto.Config{
})
func getBlockVirtualRefKeywords(root *ast.Node) (ret []string) {
- val, ok := virtualBlockRefCache.Get(root.ID)
- if !ok {
+ val, _ := virtualBlockRefCache.Get(root.ID)
+ if nil == val {
return
}
ret = val.([]string)