Hey, I have a worker in ECS and a few Prefect dep...
# ask-community
b
Hey, I have a worker in ECS and a few Prefect deployments. I want to enable cache for Prefect Tasks. How does that work in ECS Tasks spawned by the worker?
If i understand correctly all the cache is in
PREFECT_LOCAL_STORAGE_PATH
and that is currently the only supported option.
j
You can cache the results to external storage such as an S3 bucket.
b
Is it enough to use the Prefect Result S3 ?
j
If you have an S3Bucket block from prefect_aws you can do something like this:
Copy code
from prefect.filesystems import S3

s3_block = S3.load("myawsblock")

@flow(persist_result=True, result_storage=s3_block)
def my_func():
   # call tasks the cache results
b
Great tnx
Are the task cache and results the same?