Is there any way to cache the ContainerTask ?
# ask-the-community
g
Is there any way to cache the ContainerTask ?
k
Cache=True
g
I also tried putting
Cache=True
in the ContainerTask. The wf ran, but task was not cached.
k
also cache_version="1.0", you have to sadly use both
Sorry i was wrong
when you are constructing raw tasks - they are always of type Task - check the heirarchy - https://docs.flyte.org/projects/flytekit/en/latest/_modules/flytekit/core/base_task.html#PythonTask
and then you need to create TaskMetadata and pass that - I was wrong sorry
ContainerTask(metadata=TaskMetadata(cache=True, cache_version="1.0")
g
Ok. I will try that
Thanks
It worked 🚀. Thanks