请在下面找到 nodejs 中的示例代码:
var hello_file = require.resolve('hello')
var hello = require('hello')
console.log(m.hello()); // there is a method hello in module hello.js
delete require.cache[hello_file]
console.log(m.hello()); // it still works
我认为删除会删除对模块的引用,因此最后一行应该会引发错误。但事实并非如此。可能是什么原因以及删除缓存的真正含义是什么?