---
title: "#requirecache articles | Hashnode"
description: "Explore 2 articles tagged #requirecache on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/requirecache"
---

Tag

# #requirecache

2 posts · 0 followers

[Gemma Black](https://hashnode.com/@GemmaBlack) · [Nov 17, 2024](https://hashnode.com/posts/nodejs-using-fswatch-to-re-import-commonjs-modules/673a4071ece0894219008f99)

### [Node.js: using fs.watch to re-import CommonJS modules.](https://gemmablack.dev/nodejs-using-fswatch-to-re-import-commonjs-modules?utm_source=hashnode&utm_medium=feed)

Disclaimer. This is an investigation into what is possible. Not a fully-blown solution into how to reload modules without restarting the whole server. In a previous article, I was investigating how to use require.cache to refresh a module by deletin...

3 min read · [gemmablack.dev](https://gemmablack.dev/nodejs-using-fswatch-to-re-import-commonjs-modules?utm_source=hashnode&utm_medium=feed)

[Gemma Black](https://hashnode.com/@GemmaBlack) · [Nov 17, 2024](https://hashnode.com/posts/nodejs-refreshing-a-module-using-requirecache/6739b4167e35daafe18ccf4b)

### [Node.js: refreshing a module using require.cache](https://gemmablack.dev/nodejs-refreshing-a-module-using-requirecache?utm_source=hashnode&utm_medium=feed)

This is purely in reference to CommonJS modules. TLDR Before I bore you with why I did this, refreshing a module can be done by deleting its reference in the require.cache object. Like so: require('./some-module') // use module delete require.cach...

5 min read · [gemmablack.dev](https://gemmablack.dev/nodejs-refreshing-a-module-using-requirecache?utm_source=hashnode&utm_medium=feed)
