mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 偶发编辑文档标题后引用处的动态锚文本不更新 Fix https://github.com/siyuan-note/siyuan/issues/5891
This commit is contained in:
parent
a8560b365b
commit
5861be23ee
3 changed files with 18 additions and 4 deletions
|
|
@ -93,6 +93,8 @@ func ClearVirtualRefKeywords() {
|
|||
memCache.Del("virtual_ref")
|
||||
}
|
||||
|
||||
var defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
|
||||
|
||||
func GetRefsCacheByDefID(defID string) (ret []*Ref) {
|
||||
for defBlockID, refs := range defIDRefsCache.Items() {
|
||||
if defBlockID == defID {
|
||||
|
|
@ -110,8 +112,6 @@ func GetRefsCacheByDefID(defID string) (ret []*Ref) {
|
|||
return
|
||||
}
|
||||
|
||||
var defIDRefsCache = gcache.New(30*time.Minute, 5*time.Minute) // [defBlockID]map[refBlockID]*Ref
|
||||
|
||||
func CacheRef(tree *parse.Tree, refNode *ast.Node) {
|
||||
ref := buildRef(tree, refNode)
|
||||
putRefCache(ref)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue