title: Redis Async / Await Issue in node.js
body: <p>Method asyncBlock is getting executed properly. </p>
  
  <p>but (other two methods) when its is split into 2 methods its retuning promise instead of the actual value. </p>
  
  <p><a href="https://runkit.com/sedhuait/5af7bc4eebb12c00128f718e" rel="noreferrer">https://runkit.com/sedhuait/5af7bc4eebb12c00128f718e</a></p>
  
  <pre><code>const asyncRedis = require("async-redis");
  const myCache = asyncRedis.createClient();
  
  myCache.on("error", function(err) {
      console.log("Error " + err);
  });
  
  const asyncBlock = async() =&gt; {
      await myCache.set("k1", "val1");
      const value = await myCache.get("k1");
      console.log("val2",value);
  
  };
  var setValue = async(key, value) =&gt; {
      await myCache.set(key, value);
  };
  
  var getValue = async(key) =&gt; {
      let val = await myCache.get(key);
      return val;
  };
  asyncBlock(); //  working 
  setValue("aa", "bb"); // but this isn't 
  console.log("val", getValue("aa"));//but this isn't 
  </code></pre>
  
  <p>Output </p>
  
  <pre><code>val Promise { &lt;pending&gt; }
  val2 val1
  </code></pre>