set = async (key, value, ttl = undefined) => {
  const lock = await redlock.lock(`redlock:${key}`, 1000);

  let result;
  if (ttl) {
    result = await redis.setex(key, ttl, value);
  } else {
    result = await redis.set(key, value);
  }

  await lock.unlock();
  return result;
}
Set cache value

@param {*} key
@param {*} value
@param {*} ttl seconds