From 7aa7191f17de1494846b6d053210ac2d2df6f6ae Mon Sep 17 00:00:00 2001 From: Mohammed Essehemy Date: Mon, 24 Sep 2018 23:33:53 +0200 Subject: [PATCH] Clear handler cache on add or disable remoteMethods --- lib/application.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/application.js b/lib/application.js index d68102ea5..bc1ba6644 100644 --- a/lib/application.js +++ b/lib/application.js @@ -151,9 +151,11 @@ app.model = function(Model, config) { var self = this; Model.on('remoteMethodDisabled', function(model, methodName) { + clearHandlerCache(self); self.emit('remoteMethodDisabled', model, methodName); }); Model.on('remoteMethodAdded', function(model) { + clearHandlerCache(self); self.emit('remoteMethodAdded', model); });