Skip to content
Open
Changes from 1 commit
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
Next Next commit
handle invalidate messages from topic __redis__:invalidate
  • Loading branch information
chisenberg committed Mar 27, 2025
commit 2e886f840a0c8d6187c3bfe7445d0c85a8496afa
10 changes: 10 additions & 0 deletions pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Loading