From f4c4a2d5faaf0a40fda1b245840a035e84d429fe Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 22 Mar 2024 10:05:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BC=93=E5=AD=98=E7=B4=A2=E5=BC=95?= =?UTF-8?q?=E4=B8=AD=E5=88=A4=E6=96=AD=E7=BC=93=E5=AD=98=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=97=B6=E5=A2=9E=E5=8A=A0=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/list_file_sqlite.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/caches/list_file_sqlite.go b/internal/caches/list_file_sqlite.go index 8c4740c..40441ca 100644 --- a/internal/caches/list_file_sqlite.go +++ b/internal/caches/list_file_sqlite.go @@ -160,6 +160,11 @@ func (this *SQLiteFileList) Exist(hash string) (bool, error) { } return false, err } + + if expiredAt < fasttime.Now().Unix() { + return false, nil + } + this.memoryCache.Write(hash, zero.Zero{}, this.maxExpiresAtForMemoryCache(expiredAt)) return true, nil }