lib/command/string.js
function set(key, value /*, exflag, secs, pxflag, ms, xflag, req*/) {
  var i
    , arg
    // expiry flag: EX | PX
    , flag
    // expiry value: number
    , expiry
    // exists flag: NX | XX
    , xflag
    // request object when available
    , req;

  for(i = 0;i < arguments.length;i++) {
    arg = arguments[i];
    if(typeof arg === 'object') {
      req = arg;
    }else if(arg === Constants.NX || arg === Constants.XX) {
      xflag = arg;
    }else if(arg === Constants.EX || arg === Constants.PX) {
      flag = arg;
      expiry = arguments[++i];
    }
  }
  return this.setKey(key, value, flag, expiry, xflag, req) || null;
}
function set(key, value /*, exflag, secs, pxflag, ms, xflag, req*/) {
  var i
    , arg
    // expiry flag: EX | PX
    , flag
    // expiry value: number
    , expiry
    // exists flag: NX | XX
    , xflag
    // request object when available
    , req;

  for(i = 0;i < arguments.length;i++) {
    arg = arguments[i];
    if(typeof arg === 'object') {
      req = arg;
    }else if(arg === Constants.NX || arg === Constants.XX) {
      xflag = arg;
    }else if(arg === Constants.EX || arg === Constants.PX) {
      flag = arg;
      expiry = arguments[++i];
    }
  }
  return this.setKey(key, value, flag, expiry, xflag, req) || null;
}
function set ( key , value /*, exflag, secs, pxflag, ms, xflag, req*/ ) { var i , arg // expiry flag: EX | PX , flag // expiry value: number , expiry // exists flag: NX | XX , xflag // request object when available , req ; for ( i = 0 ; i < arguments . length ; i ++ ) { arg = arguments [ i ] ; if ( typeof arg === 'object' ) { req = arg ; } else if ( arg === Constants . NX || arg === Constants . XX ) { xflag = arg ; } else if ( arg === Constants . EX || arg === Constants . PX ) { flag = arg ; expiry = arguments [ ++ i ] ; } } return this . setKey ( key , value , flag , expiry , xflag , req ) || null ; }
Set a key value pair.

When EX and PX are combined the last declaration wins.
Set a key value pair .