Caching
Caching is used to cache the results of a script, flow, flow step or app inline script for a specified number of seconds, thereby reducing the need for redundant computations when re-running the same step with identical input.
When you configure caching, Orvanta stores the result in a cache for the duration you specify. If the same runnable is re-triggered with the same input within this duration, Orvanta instantly retrieves the cached result instead of re-computing it.
This feature can significantly improve the performance of your scripts and flows, especially for steps that are computationally demanding or dependent on external resources, such as APIs or databases.
Cache scripts
Section titled “Cache scripts”Caching a script means caching the results of that script for a certain duration. If the script is triggered with the same inputs during the given duration, it returns the cached result.
You can enable caching for a script directly in the script Settings:
- Settings: from the script editor, pick the “Settings” menu and scroll to “Cache”.
- Enable caching: toggle on “Cache the results for each possible inputs” and specify the desired duration for caching results (in seconds).
For example, if the result of the script is cached for 180 seconds (3 minutes) and the script is re-triggered with the same input within this period, Orvanta immediately returns the cached result.
Cache flows
Section titled “Cache flows”Caching a flow means caching the results of that flow for a certain duration. If the flow is triggered with the same flow inputs during the given duration, it returns the cached result.
You can enable caching for a flow directly in the flow settings:
- Settings: from the flow editor, go to the “Settings” menu and pick the
Cachetab. - Enable caching: toggle on “Cache the results for each possible inputs” and specify the desired duration for caching results (in seconds).
For example, with a 60-second cache, if the flow is re-triggered with the same input within this period, Orvanta immediately returns the cached result.
Cache flow steps
Section titled “Cache flow steps”Caching a flow step means caching the results of that step for a certain duration. If the step is triggered with the same inputs during the given duration, it returns the cached result.
You can enable caching for a step directly in the step configuration:
- Select a step: from the flow editor, select the step for which you want to cache the results.
- Enable caching: navigate to the
Advancedmenu and selectCache. Toggle it on and specify the desired duration for caching results (in seconds).
For example, with an 86400-second (1 day) cache, if the step is re-triggered with the same input within this period, Orvanta immediately returns the cached result.
Step mocking / pin result
Section titled “Step mocking / pin result”Step mocking / pin result allows faster iteration. When a step is mocked, it immediately returns the mocked value without performing any computation.
Cache app inline scripts
Section titled “Cache app inline scripts”Caching an app inline script means caching the results of that script for a certain duration. If the script is triggered with the same inputs during the given duration, it returns the cached result.
You can enable caching for an app inline script directly in its editor settings:
- Settings: from the code editor, go to the top bar and pick the
Cachetab. - Enable caching: toggle on “Cache the results for each possible inputs” and specify the desired duration for caching results (in seconds).
For example, with a 5-minute cache, if the inline script is re-triggered with the same input within this period, Orvanta immediately returns the cached result.
Related
Section titled “Related”- Concurrency limits — Cap simultaneous executions.
- Job debouncing — Collapse bursts of jobs into batches.