Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down