Let say, after I require a module and do something as below:
var b = require(\'./b.js\'); --- do something with b ---
Then I want to take a
I have found the easiest way to handle invalidating the cache is actually to reset the exposed cache object. When deleting individual entries from the cache, the child dependencies become a bit troublesome to iterate through.
require.cache = {};