From eb526b18c5eb6059f280820d6120e2f2403cb473 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 7 Jan 2013 12:49:18 +0000 Subject: [PATCH] Delete the pages module cache for a module if it exists --- run.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/run.js b/run.js index 5efe12c..d8220fe 100644 --- a/run.js +++ b/run.js @@ -151,6 +151,14 @@ DBot.prototype.reloadModules = function() { var cacheKey = require.resolve(moduleDir + name); delete require.cache[cacheKey]; + try { + var webKey = require.resolve(moduleDir + 'web'); + } catch(err) { + } + if(webKey) { + delete require.cache[webKey]; + } + try { // Load the module config data try {