java - How to save unread chat messages using redis, and how to do it more reasonably.
PHP中文网
PHP中文网 2017-06-21 10:11:46
0
1
1345

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.

PHP中文网
PHP中文网

认证0级讲师

reply all(1)
黄舟

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template