Level 50
Redis:zrem key data first then
Redis:zadd() zadd only counts the number of new elements added.
please try this. You'll have to remove the old data and add the new
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
At present my code is
Redis::zincrby('users.' . auth()->user()->id . '.chats', time(), $reciever);
But this is misleading . As I don't want to increase the score by an amount of time() rather I want to override the value of score by time() itself . In short how can I change the value of the score ? (I want to override it and not increament it).
Redis:zrem key data first then
Redis:zadd() zadd only counts the number of new elements added.
please try this. You'll have to remove the old data and add the new
Please or to participate in this conversation.