diff --git a/lib/plugins/node_modules/@flowfuse/flowfuse-blueprint-plugin/blueprintPlugin.js b/lib/plugins/node_modules/@flowfuse/flowfuse-blueprint-plugin/blueprintPlugin.js index c629b98f..7f98b9b9 100644 --- a/lib/plugins/node_modules/@flowfuse/flowfuse-blueprint-plugin/blueprintPlugin.js +++ b/lib/plugins/node_modules/@flowfuse/flowfuse-blueprint-plugin/blueprintPlugin.js @@ -28,7 +28,7 @@ module.exports = function (RED) { // We do not retrieve the blueprint list on every request; we get it once and cache the result. // The cache is expired after 2 minutes. Most interactions with the library will be short-lived // and within this interval - so this is the right balance between performance and freshness. - const blueprintCache = {} + let blueprintCache = {} let cacheLastRefreshedAt = 0 const CACHE_EXPIRY_PERIOD = 2 * 60 * 1000 // 2 minutes in milliseconds @@ -153,6 +153,7 @@ module.exports = function (RED) { team: this.teamID } }) + blueprintCache = {} const blueprints = JSON.parse(result.body) for (const blueprint of blueprints.blueprints) { blueprintCache[blueprint.category || 'blueprints'] = blueprintCache[blueprint.category || 'blueprints'] || []