From 792c56bda56a64e65a2d0ea380bdf79af9ac5687 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Mon, 25 Nov 2024 23:56:40 +0800 Subject: [PATCH] chore: ignore nil redis error --- internal/pkg/cache/redis.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/pkg/cache/redis.go b/internal/pkg/cache/redis.go index d09fe4ba..3ba23db5 100644 --- a/internal/pkg/cache/redis.go +++ b/internal/pkg/cache/redis.go @@ -108,6 +108,11 @@ func (c redisCache) MGet(ctx context.Context, keys []string, result any) error { for _, message := range results { var v = reflect.New(elementType) + //nolint:errorlint + if message.Error() == rueidis.Nil { + continue + } + e := message.DecodeJSON(v.Interface()) if e != nil { logger.Warn("unexpected failure when decoding json", zap.Error(e))