Answer the question
In order to leave comments, you need to log in
How to remove list from redis?
Good day, the following problem arose:
There is a chat, Redis is used to store messages, each message is written to 'list'.
Message example:
{
"id": "fafe1b60c24107ccd8f4562213e44849",
"userid": "1",
"avatar": "img url",
"time": "19:19",
"messages": "any text",
"username": "User1",
}
$id = "fafe1b60c24107ccd8f4562213e44849";
$this->redis->lrem(self::CHAT_CHANNEL, 0, $id);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question