From 698a38e773c1272a7d98b5e83968f33c2cc2a93c Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Wed, 27 Oct 2021 11:39:46 +0800 Subject: [PATCH] clear status page cache in a better place --- server/model/monitor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index fb736291..126f091c 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -351,6 +351,10 @@ class Monitor extends BeanModel { if (isImportant) { bean.important = true; await Monitor.sendNotification(isFirstBeat, this, bean); + + // Clear Status Page Cache + apicache.clear(); + } else { bean.important = false; } @@ -598,9 +602,6 @@ class Monitor extends BeanModel { console.log(e); } } - - // Clear Status Page Cache - apicache.clear(); } }