How to save unread chat messages using redis. I used to use lpush to save. keys is the ID of the person who has not read the message, and vlaue is the object. All unread messages sent to this person are saved in this collection. There is a flaw. After reading the unread messages, I want to delete the read messages. Other people's chats are also deleted. Now I want to improve it, but I don't know what way to solve it. Thanks for informing.
I am used to using
zset
to store messages, because not only one person sends messages to him, but the recipient is also likely to click on the messages in random order