https://prefect.io logo
e

Edward at Evo

07/06/2023, 2:25 PM
I cannot understand the use case for results - can you make an example? Also can they be used for subflows, other than tasks? How they integrate with the concept of retries?
đź‘€ 1
e

Emil Christensen

07/06/2023, 2:29 PM
We can discuss more when we regroup, but the most important use case for results is caching. Say you’re making 100,000 API calls… you’ll want to use results (via caching) to store those so that you don’t have to redo any requests in case of failure or changes to your code.
Results are only for tasks - not flows (or subflows). They don’t really interact with retries… you can use either feature independently.
e

Edward at Evo

07/06/2023, 2:30 PM
So results are a form of caching in some way - what's the difference between them? And sure, let's discuss when we regroup if my qiuestion is not too basic XD
e

Emil Christensen

07/06/2023, 2:32 PM
Not at all! It’s a great question. Think of results as one half of caching… In order to get caching we need the
result
, and a
key
.