title: Nodejs IOREDIS: how to set expire time for a key?
body: <p>I am connecting to a Redis sentinel using the code given below</p>
  
  <pre><code>var Redis = require('ioredis');
  var redis = new Redis({
      sentinels: [{ host: '99.9.999.99', port: 88888 }],
      name: 'mymaster'
  });
  </code></pre>
  
  <p>I am setting the value of a key by using following code:</p>
  
  <pre><code>function (key, data) {
  
          var dataInStringFormat = JSON.stringify(data); /// conbverting obj to string
  
          /// making promise for returning
          var promise = new Promise(function (resolve, reject) {
              /// set data in redis
              redis.set(key, dataInStringFormat)
                  .then(function (data) {
                      resolve(data);
                  }, function (err) {
                      reject(err);
                  });
          });
  
          return promise;
  
      }
  </code></pre>
  
  <p>Can you please help me by providing a solution to set an expire time for the key value e.g. 12 hours</p>