search

Home  >  Q&A  >  body text

Redis缓存更新的锁问题

高并发情况下 多个请求同时更新同一个key的redis缓存 如何加锁? 这个是需要程序上实现 还是redis本身带有?

PHPzPHPz2795 days ago1044

reply all(2)I'll reply

  • 淡淡烟草味

    淡淡烟草味2017-04-24 16:02:12

    Redis It is a single-threaded model, so there is no locking problem.

    reply
    0
  • 某草草

    某草草2017-04-24 16:02:12

    You can take a look at the documentation of watch+multi/exec, which may meet your needs.

    reply
    0
  • Cancelreply