J
J
jenya77712018-02-03 13:07:47
Redis
jenya7771, 2018-02-03 13:07:47

How to make a queue for changing a variable in redis?

Hello, there are those on the site. support and in order to display to admins in the header how many questions are still open, I want to store this amount in a radish, and when creating a question or closing it, just change this value so as not to constantly make an extra request to the database. And from this the question arises, if several users create a question at the same time, then how will the change in the radish happen in this case, I think that the value will not be correct, and therefore it is necessary to somehow organize a queue to change this value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2018-02-03
@RidgeA

Maybe this - https://redis.io/commands/incr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question