function renameKey(type, oldName, newName) {
  const newKey = redisStore.toKey(type, newName);
  const oldKey = redisStore.toKey(type, oldName);
  const indexName = redisStore.constants.indexKey[type];
  const cmds = [];

  // remove the old key from the master list of index
  cmds.push(['srem', indexName, oldKey]);

  // add the new key to the master list of index
  cmds.push(['sadd', indexName, newKey]);

  // rename the set with the new name
  cmds.push(['rename', oldKey, newKey]);
  return redisClient.batch(cmds).execAsync()
  .then((ret) => Promise.resolve(ret))
  .catch((err) => Promise.reject(err));
} // renameKey
/**
 * Renames the entry in subject or aspect master list and the corresponding
 * hash identified by the entry. Use this to handle the subject store and aspect
 * store entries and its corresponding hashes.
 * @param  {String} type - The type of the master list on which the
 *  set operations are to be performed
 * @param  {String} oldName - The old key name
 * @param  {String} newName - The new key name
 * @returns {Promise} - which resolves to the values returned by the redis batch
 * command
 */
Renames the entry in subject or aspect master list and the corresponding
hash identified by the entry. Use this to handle the subject store and aspect
store entries and its corresponding hashes.
@param  {String} type - The type of the master list on which the
set operations are to be performed
@param  {String} oldName - The old key name
@param  {String} newName - The new key name
@returns {Promise} - which resolves to the values returned by the redis batch
command
Renames the entry in subject or aspect master list and the corresponding hash identified by the entry . Use this to handle the subject store and aspect store entries and its corresponding hashes . @param { String } type - The type of the master list on which the set operations are to be performed @param { String } oldName - The old key name @param { String } newName - The new key name @returns { Promise } - which resolves to the values returned by the redis batch command
function renameKey(type, oldName, newName) {
  const newKey = redisStore.toKey(type, newName);
  const oldKey = redisStore.toKey(type, oldName);
  const indexName = redisStore.constants.indexKey[type];
  const cmds = [];
  cmds.push(['srem', indexName, oldKey]);
  cmds.push(['sadd', indexName, newKey]);
  cmds.push(['rename', oldKey, newKey]);
  return redisClient.batch(cmds).execAsync()
  .then((ret) => Promise.resolve(ret))
  .catch((err) => Promise.reject(err));
} 
function renameKey ( type , oldName , newName ) { const newKey = redisStore . toKey ( type , newName ) ; const oldKey = redisStore . toKey ( type , oldName ) ; const indexName = redisStore . constants . indexKey [ type ] ; const cmds = [ ] ; cmds . push ( [ 'srem' , indexName , oldKey ] ) ; cmds . push ( [ 'sadd' , indexName , newKey ] ) ; cmds . push ( [ 'rename' , oldKey , newKey ] ) ; return redisClient . batch ( cmds ) . execAsync ( ) . then ( ( ret ) => Promise . resolve ( ret ) ) . catch ( ( err ) => Promise . reject ( err ) ) ; }
Renames the entry in subject or aspect master list and the corresponding
 hash identified by the entry.
Renames the entry in subject or aspect master list and the corresponding hash identified by the entry .
// remove the old key from the master list of index // add the new key to the master list of index // rename the set with the new name // renameKey