lib/utils.js
function purgeCache(moduleName) {
  return searchAndProcessCache(moduleName, function (mod) {
    delete require.cache[mod.id];
  })
  .then(() => {
    _.forEach(_.keys(module.constructor._pathCache), function(cacheKey) {
      if (cacheKey.indexOf(moduleName)>0) {
        delete module.constructor._pathCache[cacheKey];
      }
    });
    return BbPromise.resolve();
  });
}
function purgeCache(moduleName) {
  return searchAndProcessCache(moduleName, function (mod) {
    delete require.cache[mod.id];
  })
  .then(() => {
    _.forEach(_.keys(module.constructor._pathCache), function(cacheKey) {
      if (cacheKey.indexOf(moduleName)>0) {
        delete module.constructor._pathCache[cacheKey];
      }
    });
    return BbPromise.resolve();
  });
}
function purgeCache ( moduleName ) { return searchAndProcessCache ( moduleName , function ( mod ) { delete require . cache [ mod . id ] ; } ) . then ( ( ) => { _ . forEach ( _ . keys ( module . constructor . _pathCache ) , function ( cacheKey ) { if ( cacheKey . indexOf ( moduleName ) > 0 ) { delete module . constructor . _pathCache [ cacheKey ] ; } } ) ; return BbPromise . resolve ( ) ; } ) ; }
Remove the specified module from the require cache.
@param {string} moduleName
Remove the specified module from the require cache .