Hello team, I have been doing some POC using pref...
# ask-community
l
Hello team, I have been doing some POC using prefect . Does anyone know how to run a specific task in a prefect DAG . Specifically, I want it to reuse the task’s upstream task cache . Say in a flow, we have outputs=task1() and task2(outputs) . I would like to run task2 without recalculating task1. Thanks a lot !
w
hey Y - you can use the cache_key_fn arg and the task_input_hash utility to achieve this. You can learn more about this here and you'll need to ensure your result persistence is turned on so we have something to compute the hash with.