Question about caching behavior: If I have a task ...
# ask-the-community
r
Question about caching behavior: If I have a task that’s reused between 2 workflows, does caching still work if the inputs are the same? Or is it tied to the workflow?
d
Caching is determined at the cache level. So as long as the task inputs and
cache_version
are the same it should be reused between workflows.
k
yes @Rupsha Chaudhuri that is the principal reason why we built caching in Flyte to work across workflows and reuse results
r
woot woot.. awesome
d
If you are running two instances of a task at the same time, in your example workflow A calls task X with input "foo", and workflow B calls task X with input "foo" you can use
cache_serialize
to ensure only one of them runs and the other waits for it to complete and uses the cached results.
r
great.. that’s super helpful
152 Views