microfleet / ioredis-lock

Node distributed locking using redis
MIT License
26 stars 8 forks source link

simple SETNX example #11

Closed patrikx3 closed 7 years ago

patrikx3 commented 7 years ago

hi! thanks for helping. just asking, i just need to create a new session id, like uuid. it says this is the simple use case, but i dont get it. what do i do with the lock? i just want to add a new unique id if it doesn't exist , how do i do it?

thanks so much! ciao!

AVVS commented 7 years ago

you dont need a lock to create an id - check docs at https://redis.io/commands/set

patrikx3 commented 7 years ago

thanks so much. got it. ciao!