From 33c0bd418c5cd550461a2a1239f753b6f8688d27 Mon Sep 17 00:00:00 2001 From: yiyiis Date: Sat, 23 May 2026 00:36:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=82=B9=E8=B5=9E=E5=90=8E=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E6=8E=A8=E8=8D=90=E5=88=97=E8=A1=A8=E7=9A=84=20video:?= =?UTF-8?q?entity=20=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UpdatePopularityCache 只失效了 video:detail 缓存, 未失效 feed 使用的 video:entity 缓存(1h TTL), 导致推荐列表 likes_count 长时间显示为旧值 --- backend/internal/video/popularity_cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/internal/video/popularity_cache.go b/backend/internal/video/popularity_cache.go index b3ffaae..eb89a17 100644 --- a/backend/internal/video/popularity_cache.go +++ b/backend/internal/video/popularity_cache.go @@ -15,6 +15,7 @@ func UpdatePopularityCache(ctx context.Context, cache *rediscache.Client, id uin } _ = cache.Del(context.Background(), cache.Key("video:detail:id=%d", id)) + _ = cache.Del(context.Background(), cache.Key("video:entity:%d", id)) now := time.Now().UTC().Truncate(time.Minute) windowKey := cache.Key("hot:video:1m:%s", now.Format("200601021504"))