Evgeny Ivanov
11/08/2022, 5:46 AMcache_key_fn=task_input_hash
and cache_expiration=timedelta(days=1)
. Now for some reason I want to clear cache and run the task again (suppose I've changed the logic in a module I'm using from the task).
My options (including non-working):
1. Deleting cache files doesn't work. If I run a task after deleting files I get an error. Prefect doesn't check if the file exists before deciding on using cache.
2. Deleting flow runs or task runs does work. But it's not convenient for two reasons:
a. I should delete history of runs.
b. I have to remember which flow/task run to delete or delete all of them.
3. Adding extra parameter cache_num
to task should work. I can just change it's value every time I want to avoid using cache. But it generates extra boilerplate code and I have to change flow/task code to change parameter value. It looks like a dirty duct tape to me)
4. Changing data in OrionDB maybe possible, but I'm sure that it's strongly not recommended. And I'd like to avoid it.
Maybe there is a better option I don't know about? A perfect solution would be CLI or API with flow/task name as an input parameter.Tobias Rohnstock
11/08/2022, 9:52 AMJeff Hale
11/08/2022, 7:05 PM