From 16fa99a4ea7eaa6d10dd998a65080b3a2e9ce986 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 31 Aug 2023 15:19:01 +0200 Subject: [PATCH] clarify cache usage for scripts/flows --- .../flows/content/FlowModuleCache.svelte | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/frontend/src/lib/components/flows/content/FlowModuleCache.svelte b/frontend/src/lib/components/flows/content/FlowModuleCache.svelte index 8ac578c8b1..8c9ab08182 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleCache.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleCache.svelte @@ -18,25 +18,32 @@ value instead of recomputing it. - { - if (isCacheEnabled && flowModule.cache_ttl != undefined) { - flowModule.cache_ttl = undefined - } else { - flowModule.cache_ttl = 600 - } - }} - options={{ - right: 'Cache the results for each possible inputs' - }} -/> -
- How long to keep cache valid +{#if flowModule.value.type != 'rawscript'} +

The cache settings need to be set in the referenced script/flow settings directly. Cache for + hub scripts is not available yet.

+{:else} + { + if (isCacheEnabled && flowModule.cache_ttl != undefined) { + flowModule.cache_ttl = undefined + } else { + flowModule.cache_ttl = 600 + } + }} + options={{ + right: 'Cache the results for each possible inputs' + }} + /> +
+ How long to keep cache valid - {#if flowModule.cache_ttl} - - {:else} - - {/if} -
+ {#if flowModule.cache_ttl} + + {:else} + + {/if} +
+{/if}