Redis pipeline - atomic getting a value of another key value
<p>I have a string key named "a" and its value is "b", I also have a hash set which is named "b" and it has multiple values for example:</p>

<pre><code>"a" (value equals to "b")

"b": {
       "first_name": "John",
       "last_name": "Doe"

}
</code></pre>

<p>is it possible to use a pipeline so given the key "a" I will receive
the object b value ?</p>

<p>Thanks</p>

<p>Pipeline won't work, since you must wait until the first <code>get</code> command returns the <em>real key</em>, i.e. <em>b</em>.</p>

<p>Instead, you can achieve it with <code>lua scripts</code>.</p>

<pre><code>local real_key = redis.call('get', KEYS[1])
if real_key then return redis.call('hgetall', real_key) end
</code></pre>

<p>The whole lua script executes atomically.</p>

python redis