V
V
val182020-02-07 13:25:35
JavaScript
val18, 2020-02-07 13:25:35

How to update list item in redis?

In my redis, tokens are stored in a list (lpush user1 token1, token2, etc.).
Each of the tokens is for a user session.
I need to regenerate some token, for example token2.
There is a lset user1 index command, where user1 is the name of the list, index(yfxbyftncz c 0) is the index of the list element.
How do I find out in redis the index of a list element by its value?
Or maybe there is some other way to update the value of a list element based on the value of this element?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-02-07
@Nc_Soft

Store tokens with keys

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question