redis存hash取值
时间: 2023-10-20 14:29:39 浏览: 91
redis中hash表内容删除的方法代码
5星 · 资源好评率100%
在Redis中,可以使用hget命令来从一个hash中根据指定的key获取对应的value。具体的命令是r.hget(key, field),其中key是hash的名称,field是要获取值的键。比如,如果有一个名为"box"的hash,其中有一个键为"w",我们可以使用r.hget("box", "w")来获取它的值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python【redis之Hash 操作】](https://blog.csdn.net/qq_16792139/article/details/130809175)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Redis使用Hash存取值](https://blog.csdn.net/weixin_44655475/article/details/101163604)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文