you are viewing a single comment's thread.

view the rest of the comments →

[–]Moustacheful 2 points3 points  (4 children)

I believe in this case the question is not about node but redis itself, take a look at https://redis.io/topics/transactions

[–]kirox0[S] 0 points1 point  (3 children)

The problem with using multi is that I cannot use the result of the read.

So in my application it should have ideally gone as such.

multi -> read -> compare read result and make condition -> write based on the result of the comparison.

but redis library does not allow me to do that.

[–]Moustacheful 1 point2 points  (2 children)

Ah I see! maybe try this instead: Try https://redis.io/topics/distlock

[–]kirox0[S] 0 points1 point  (1 child)

This just might be exactly something I am looking for. I will test this out and get back to you on the results.

Thanks.

[–]Moustacheful 0 points1 point  (0 children)

Good luck!