From d976d8f7cb4174bbdc48279dbb8154d47bf51135 Mon Sep 17 00:00:00 2001 From: wood chen Date: Sun, 29 Sep 2024 03:21:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=AF=8F=E6=AC=A1=E9=83=BD?= =?UTF-8?q?=E5=9B=9E=E6=BA=90,=20=E6=8A=8A=E9=BB=98=E8=AE=A4etag=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E9=9D=99=E6=80=81=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/remote.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handler/remote.go b/handler/remote.go index b4a25fa..6db236f 100644 --- a/handler/remote.go +++ b/handler/remote.go @@ -7,7 +7,6 @@ import ( "path" "path/filepath" "strings" - "time" "webp_server_go/config" "webp_server_go/helper" @@ -152,6 +151,7 @@ func pingURL(url string) string { } func generateFallbackIdentifier(url string) string { - // 使用 URL 和当前时间生成一个唯一标识符 - return "fallback-" + helper.HashString(url + time.Now().String()) + // 使用 URL 的哈希值作为稳定的标识符 + return "fallback-" + helper.HashString(url) } +