e.g.
a=dict(a=1,b=2,c=3)
r=redis.Redis()
r.set("haha",a)
r.hget("haha","b")#this will raise a exception

the right way is as follows:
r.hmset("haha",a)#attenation:when you use this approach,if you use r.set("haha",a) first,this also will occur a exception
r.hget("haha","b")




redis hmset and set is not equviant

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2021-07-04
  • 2021-08-31
  • 2021-10-01
  • 2021-04-12
猜你喜欢
  • 2022-02-01
  • 2022-12-23
  • 2021-04-12
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案