diff --git a/go.mod b/go.mod index c1d9037acc..b84008f45d 100644 --- a/go.mod +++ b/go.mod @@ -13,3 +13,19 @@ retract ( v9.5.4 // This version was accidentally released. Please use version 9.6.0 instead. v9.5.3 // This version was accidentally released. Please use version 9.6.0 instead. ) + +replace github.com/redis/go-redis/v9 => . + +replace github.com/redis/go-redis/v9/internal => ./internal + +replace github.com/redis/go-redis/v9/internal/proto => ./internal/proto + +replace github.com/redis/go-redis/v9/internal/hashtag => ./internal/hashtag + +replace github.com/redis/go-redis/v9/internal/hscan => ./internal/hscan + +replace github.com/redis/go-redis/v9/internal/pool => ./internal/pool + +replace github.com/redis/go-redis/v9/internal/rand => ./internal/rand + +replace github.com/redis/go-redis/v9/internal/util => ./internal/util diff --git a/pubsub.go b/pubsub.go index 72b18f49a7..8cb8196372 100644 --- a/pubsub.go +++ b/pubsub.go @@ -409,6 +409,21 @@ func (c *PubSub) newMessage(reply interface{}) (interface{}, error) { return &Pong{ Payload: reply[1].(string), }, nil + case "invalidate": + msg := Message{ + Channel: "__redis__:invalidate", + } + keys, ok := reply[1].([]any) + if !ok { + return nil, fmt.Errorf("redis: unsupported pubsub message: %q", kind) + } + out := make([]string, len(keys)) + for i, key := range keys { + out[i] = key.(string) + } + msg.PayloadSlice = out + + return &msg, nil default: return nil, fmt.Errorf("redis: unsupported pubsub message: %q", kind) }