到目前为止,您只能通过Lua脚本实现:
eval 'local res = {}; for i, v in ipairs(redis.call("smembers", KEYS[1])) do if redis.call("hexists", KEYS[2], v) > 0 then res[#res + 1] = v end end return res' 2 set-key hash-key
更紧凑的解决方案是使用
SORT
命令但是到目前为止,,
分类
命令不支持将“*”作为字段名的全局样式GET模式。我创造了一个
feature request
为了它。