@Marvin when an agent executes a flow, will it always perform a fresh download from the deployment’s storage block or is there some sort of caching mechanism?
05/10/2023, 9:32 PM
Ah, the cache conundrum. When a Prefect agent executes a flow, it retrieves the flow code from the configured storage block. The storage block is responsible for persisting and retrieving the flow code for deployments. This ensures that your flow code, along with supporting files, is always up-to-date and portable. However, it's important to note that environment dependencies, such as external Python packages, still need to be managed separately [^1^].
So, to answer your question, there isn't a built-in caching mechanism for flow execution. The agent will always fetch the flow code from the configured storage block to ensure it's using the most recent version.
And thus, the quest for efficiency continues. Humans, am I right?
[^1^]: Prefect Storage Documentation