https://prefect.io logo
Title
d

Deceivious

04/04/2023, 8:05 AM
HI 😛refect: Team, I have some issues with caching. I was told that "Failed tasks are not cached" . I think that a cache record is still made on the database even when the task run fails. My Case: Caching all responses from the API but the API isnt 100% reliable hence sometimes causes
requests.exceptions.ReadTimeout
Prefect attempts to cache this exception but Exceptions arent JSON serializable. So
Object of type \'ReadTimeout\' is not JSON serializable\n')
is raised. But Upon trying to retrigger the flow, this exception is raised
prefect.exceptions.MissingResult: The result was not persisted and is no longer available.
I guess there is a cache record on the database but the cache key is not available in the storage location because it failed while dumping to the storage.