想知道为何Redis用乐观锁,而MySQL数据库却没有用。乐观锁说白了并不是锁,而只是版本号检查而已,为何Redis不像MySQL那样用真正的锁机制呢?
Optimistic locking also has advantages, it can reduce overhead, but it will cause dirty data to enter the database. Redis should be for efficiency (of course I guessed it myself), as well as the simplicity of commands.
Optimistic locking also has advantages, it can reduce overhead, but it will cause dirty data to enter the database. Redis should be for efficiency (of course I guessed it myself), as well as the simplicity of commands.