Hey everyone, hope everyone is having a great day, I am not able to figure out if persisting and caching can be used together or not or if cache can cache results in GCS or other repositories
k
Kevin Kho
12/24/2021, 8:36 PM
Checkpointing and caching can be used together. If a task is cached during the next flow run, it will just pull the checkpointed result. You need to provide a location to your Result object to pull it from.
Kevin Kho
12/24/2021, 8:38 PM
There are two forms of caching. The cache for and cache validator is the first one. This is caching by time or inputs/outputs. The second one is targets. This is file based persistence. If the file exists, the result will just be loaded from it
h
Hammad Ahmed
01/05/2022, 4:16 PM
Thanks Kevin, and sorry for late reply if I only want to use the cache currently there is not a way to specify strategy like GCP or AWS and targets in the docs
Hammad Ahmed
01/05/2022, 4:17 PM
Both of these things exists for checkpointing so I am assuming cache is stored on prefect server or cloud
k
Kevin Kho
01/05/2022, 4:22 PM
Tasks is a cached state will load the checkpoint so you would use the cache + result interface