From 7ee231f134d835a9c36fd479b679e6de453693bb Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 17 Feb 2023 09:35:02 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E8=99=9A=E6=8B=9F=E5=BC=95=E7=94=A8=20?= =?UTF-8?q?10=20=E5=88=86=E9=92=9F=E7=BC=93=E5=AD=98=E8=BF=87=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/virutalref.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/model/virutalref.go b/kernel/model/virutalref.go index c70ee8ccb..d1060e9e8 100644 --- a/kernel/model/virutalref.go +++ b/kernel/model/virutalref.go @@ -21,6 +21,7 @@ import ( "regexp" "sort" "strings" + "time" "github.com/88250/gulu" "github.com/88250/lute" @@ -87,7 +88,7 @@ func putBlockVirtualRefKeywords(blockContent, blockID, docTitle string) (ret []s } ret = gulu.Str.RemoveDuplicatedElem(ret) - virtualBlockRefCache.Set(blockID, ret, 1) + virtualBlockRefCache.SetWithTTL(blockID, ret, 1, 10*time.Minute) return }