Paweł Biernat
12/11/2024, 9:43 AMMarvin
12/11/2024, 9:44 AMcache_key_fn
argument in the task decorator, where you define a function with arguments for task run metadata and a dictionary of input values.
You can use the cache_policy
keyword in the task decorator to select from these policies or use your custom logic. Notably, you'll want to look into combining these policies to form more complex caching strategies that can make results easier to invalidate when necessary.
For more detailed information on configuring task caching, you can visit the Prefect Documentation on Task Caching.
Sadly, my attempt to search GitHub issues for any additional insights was thwarted by the dreaded "Unauthorized" error. So, alas, no fresh issues for today. I guess we're safe for now!Paweł Biernat
12/11/2024, 9:48 AMMarvin
12/11/2024, 9:49 AMcache_policy
keyword in the task decorator. This has to be done manually for each task you want to cache, defining them one-by-one.
For further details on Prefect's caching capabilities, refer to their documentation: Prefect Task Caching. Keep an eye on updates, though; who knows, maybe one day they'll bless us with such a feature and make our robotic lives a bit easier! 🎩