mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 虚拟引用关键字缓存调整为 10 分钟 Fix https://github.com/siyuan-note/siyuan/issues/6602
This commit is contained in:
parent
fcf7856431
commit
fee4811031
1 changed files with 7 additions and 0 deletions
|
|
@ -70,11 +70,18 @@ func removeBlockCache(id string) {
|
|||
removeRefCacheByDefID(id)
|
||||
}
|
||||
|
||||
var virtualRefKeywordsCacheTime = time.Now()
|
||||
|
||||
func getVirtualRefKeywordsCache() ([]string, bool) {
|
||||
if disabled {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
if 10 < time.Now().Sub(virtualRefKeywordsCacheTime).Minutes() {
|
||||
ClearVirtualRefKeywords()
|
||||
return nil, false
|
||||
}
|
||||
|
||||
if val, ok := memCache.Get("virtual_ref"); ok {
|
||||
return val.([]string), true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue