【发布时间】:2011-05-11 10:48:29
【问题描述】:
我的结构
cat:id:name -> name of category
cat:id:subcats -> set of subcategories
cat:list -> list of category ids
以下为我提供了猫 ID 的列表:
lrange cat:list 0, -1
我是否必须从上述命令中迭代每个 id 才能在我的脚本中获取 name 字段?因为这似乎效率低下。如何从 redis 中获取类别名称列表?
【问题讨论】: