From 27c0a750d0e3a2a78e6593852d2d1069d879bca7 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Thu, 2 Jan 2025 10:02:42 +0800 Subject: [PATCH] 4 --- api/controller/System.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/controller/System.go b/api/controller/System.go index 3bff2a4..031d543 100644 --- a/api/controller/System.go +++ b/api/controller/System.go @@ -137,6 +137,10 @@ func (b *System) PutSystemTime(c *gin.Context) { return } + if duration > 5*time.Minute { + duration = 5 * time.Minute + } + // 添加缓存 _, err = global.Redis.Set(c, redisKey, "1", duration).Result() if err != nil {