node-persist
node-persist copied to clipboard
Does it lock?
If I call setItem does it lock the given key for reading? I have application where one process writes data into the database and another reads and removes when it has processed the data.
nope, whichever comes first. the thing is it won't need to lock, it writes into RAM first, then persists to disk, maybe later, maybe soon after, so whatever is reading it, it's reading from RAM - think of it as a light version of redis db
RAM comment is no longer valid as of 3.0, we're no longer storing data in RAM, it all depends on the OS's disk I/O transactions