skip to Main Content

How to hold a lock to redis?

I have the following NodeJS code that initialize a list only if the list doesn't exist. if (redisClient.lLen('mylist') === 0) { let initialVal = Array(100).fill(-1) await redisClient.rPush('mylist', initialVal) } If the above code is running at the same time by…

VIEW QUESTION
Back To Top
Search