Browse Source

add require.cache

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
54e844cf08
  1. 4
      doc/api.markdown
  2. 1
      src/node.js

4
doc/api.markdown

@ -3243,6 +3243,10 @@ a directory.
paths onto it, or at startup with the `NODE_PATH` environmental
variable (which should be a list of paths, colon separated).
The second time `require('foo')` is called, it is not loaded again from
disk. It looks in the `require.cache` object to see if it has been loaded
before.
## Addons

1
src/node.js

@ -268,6 +268,7 @@ var module = (function () {
require.extensions = extensions;
// TODO: Insert depreciation warning
require.registerExtension = registerExtension;
require.cache = moduleCache;
var dirname = path.dirname(filename);

Loading…
Cancel
Save