node.js require() cache - possible to invalidate?

后端 未结 17 1916
我寻月下人不归
我寻月下人不归 2020-11-22 06:52

From the node.js documentation:

Modules are cached after the first time they are loaded. This means (among other things) that every call to require(\'

17条回答
  •  独厮守ぢ
    2020-11-22 07:34

    The documentation says:

    Modules are cached in this object when they are required. By deleting a key value from this object, the next require will reload the module. This does not apply to native addons, for which reloading will result in an error.

提交回复
热议问题