@@ -324,12 +324,6 @@ export interface ToolWithParameters {
324324
325325let blockConfigCache : Record < string , BlockConfig > | null = null
326326
327- const workflowInputFieldsCache = new Map <
328- string ,
329- { fields : Array < { name : string ; type : string } > ; timestamp : number }
330- > ( )
331- const WORKFLOW_CACHE_TTL = 5 * 60 * 1000 // 5 minutes
332-
333327function getBlockConfigurations ( ) : Record < string , BlockConfig > {
334328 if ( ! blockConfigCache ) {
335329 try {
@@ -726,18 +720,12 @@ async function applyDynamicSchemaForWorkflow(
726720}
727721
728722/**
729- * Helper function to fetch workflow input fields with caching
723+ * Fetches workflow input fields from the API.
724+ * No local caching - relies on React Query caching on the client side.
730725 */
731726async function fetchWorkflowInputFields (
732727 workflowId : string
733728) : Promise < Array < { name : string ; type : string } > > {
734- const cached = workflowInputFieldsCache . get ( workflowId )
735- const now = Date . now ( )
736-
737- if ( cached && now - cached . timestamp < WORKFLOW_CACHE_TTL ) {
738- return cached . fields
739- }
740-
741729 try {
742730 const { buildAuthHeaders, buildAPIUrl } = await import ( '@/executor/utils/http' )
743731
@@ -750,10 +738,7 @@ async function fetchWorkflowInputFields(
750738 }
751739
752740 const { data } = await response . json ( )
753- const fields = extractInputFieldsFromBlocks ( data ?. state ?. blocks )
754- workflowInputFieldsCache . set ( workflowId , { fields, timestamp : now } )
755-
756- return fields
741+ return extractInputFieldsFromBlocks ( data ?. state ?. blocks )
757742 } catch ( error ) {
758743 logger . error ( 'Error fetching workflow input fields:' , error )
759744 return [ ]
0 commit comments