title: How do I "update" a required file during the node process?
body: <p>So I have been trying to make a system with &quot;memory&quot;. I used a JSON file for this, but it never refreshes the file. I looked it up and I got a function showing this</p>
  <pre><code>    function requireUncached(module) {
      delete require.cache[require.resolve(module)];
      return require(module);
  }
  </code></pre>
  <p>but they didn't show any syntax. Do I only put it at the top instead of <code>const whatever = require(file)</code>? Do I do it in every function it needs to be refreshed in? I have no idea. The reason I need this is so that it is all automatic and I don't have to do <strong>node .</strong> every time.</p>