From f896d5e59cf900431ced9987c14a530cdc7377aa Mon Sep 17 00:00:00 2001 From: Matt Martyn Date: Fri, 19 May 2023 12:17:30 -0400 Subject: [PATCH] Bubbling up the same error that redigo uses so that the logic to short circuit cache is consistent when using cluster mode --- redis/cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/cache.go b/redis/cache.go index 0ad0a4b..22a7f98 100644 --- a/redis/cache.go +++ b/redis/cache.go @@ -202,7 +202,7 @@ func (r *redisC) doCmd(cmd string, args ...interface{}) (interface{}, error) { defer r.conf.TimeTracker(commandKpiName(cmd), time.Now()) result, err := r.cluster.Do(context.Background(), append([]interface{}{cmd}, args...)...).Result() if err == redisCluster.Nil { - return result, nil + return result, redis.ErrNil } return result, err