search

Home  >  Q&A  >  body text

node.js - redis可以两个key对应一个value吗?

在node中使用redis,可以有这样的存储吗,redis.set('key1','key2',value) ,这样对一个value修改的时候,两个key1、key2就都修改完了?不用分两次修改

怪我咯怪我咯2786 days ago446

reply all(3)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:51:53

    You can use the pipeline supported by redis and submit it as a request.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 15:51:53

    It is better to save twice.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:51:53

    Since you want two keys to reference one memory address, why not just use one key

    reply
    0
  • Cancelreply