🐛 Document content not updated after snapshot rollback https://github.com/siyuan-note/siyuan/issues/17026

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel
2026-02-13 00:00:38 +08:00
parent 1c81eabaf7
commit d007668d10
2 changed files with 8 additions and 2 deletions

View File

@@ -52,3 +52,7 @@ func SetTreeData(rootID string, raw []byte) {
func RemoveTreeData(rootID string) {
treeCache.Del(rootID)
}
func ClearTreeCache() {
treeCache.Clear()
}

View File

@@ -797,6 +797,10 @@ func VacuumDataIndex() {
}
func FullReindex() {
cache.ClearTreeCache()
cache.ClearDocsIAL()
cache.ClearBlocksIAL()
task.AppendTask(task.DatabaseIndexFull, fullReindex)
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
go func() {
@@ -804,8 +808,6 @@ func FullReindex() {
ResetVirtualBlockRefCache()
}()
task.AppendTaskWithTimeout(task.DatabaseIndexEmbedBlock, 30*time.Second, autoIndexEmbedBlock)
cache.ClearDocsIAL()
cache.ClearBlocksIAL()
task.AppendTask(task.ReloadUI, util.ReloadUI)
}