mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 10:44:20 +01:00
🎨 调整数据库缓存
This commit is contained in:
parent
6a5617dcc1
commit
19f44148d4
13 changed files with 17 additions and 22 deletions
|
|
@ -506,7 +506,6 @@ func ReloadUI() {
|
|||
|
||||
func FullReindex() {
|
||||
task.AppendTask(task.DatabaseIndexFull, fullReindex)
|
||||
task.AppendTask(task.DatabaseCache, sql.EnableCache)
|
||||
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||
task.AppendTask(task.ReloadUI, util.ReloadUI)
|
||||
}
|
||||
|
|
@ -521,7 +520,6 @@ func fullReindex() {
|
|||
}
|
||||
treenode.InitBlockTree(true)
|
||||
|
||||
sql.DisableCache()
|
||||
openedBoxes := Conf.GetOpenedBoxes()
|
||||
for _, openedBox := range openedBoxes {
|
||||
index(openedBox.ID)
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ func RollbackDocHistory(boxID, historyPath string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
util.ReloadUI()
|
||||
FullReindex()
|
||||
IncSync()
|
||||
return nil
|
||||
|
|
@ -297,9 +298,9 @@ func RollbackNotebookHistory(historyPath string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
util.ReloadUI()
|
||||
FullReindex()
|
||||
IncSync()
|
||||
ReloadUI()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,9 +131,6 @@ func index(boxID string) {
|
|||
}
|
||||
|
||||
func IndexRefs() {
|
||||
sql.EnableCache()
|
||||
defer sql.ClearBlockCache()
|
||||
|
||||
start := time.Now()
|
||||
util.SetBootDetails("Resolving refs...")
|
||||
util.PushStatusBar(Conf.Language(54))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue