From 2e886f840a0c8d6187c3bfe7445d0c85a8496afa Mon Sep 17 00:00:00 2001 From: Christian Isenberg Date: Thu, 27 Mar 2025 15:18:30 -0300 Subject: [PATCH] handle invalidate messages from topic __redis__:invalidate --- pubsub.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pubsub.go b/pubsub.go index 72b18f49a..643b7685f 100644 --- a/pubsub.go +++ b/pubsub.go @@ -409,6 +409,16 @@ func (c *PubSub) newMessage(reply interface{}) (interface{}, error) { return &Pong{ Payload: reply[1].(string), }, nil + case "invalidate": + payload := reply[1].([]interface{}) + ss := make([]string, len(payload)) + for i, s := range payload { + ss[i] = s.(string) + } + return &Message{ + Channel: "__redis__:invalidate", + PayloadSlice: ss, + }, nil default: return nil, fmt.Errorf("redis: unsupported pubsub message: %q", kind) }