From 18dbd282b664ebf10ee7633c50bcdb8c4e2af0af Mon Sep 17 00:00:00 2001 From: Dan Gowans Date: Tue, 2 Jul 2024 11:17:11 -0400 Subject: [PATCH] avoid sending unnecessary messages --- helpers/functions.cache.js | 3 +++ helpers/functions.cache.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/helpers/functions.cache.js b/helpers/functions.cache.js index defd7b46..1524fc8f 100644 --- a/helpers/functions.cache.js +++ b/helpers/functions.cache.js @@ -227,6 +227,9 @@ export function clearCacheByTableName(tableName, relayMessage = true) { clearWorkOrderTypesCache(); break; } + default: { + return; + } } try { if (relayMessage && cluster.isWorker) { diff --git a/helpers/functions.cache.ts b/helpers/functions.cache.ts index 429534df..0ade01a3 100644 --- a/helpers/functions.cache.ts +++ b/helpers/functions.cache.ts @@ -353,6 +353,10 @@ export function clearCacheByTableName( clearWorkOrderTypesCache() break } + + default: { + return + } } try {