How to cache StreamingResponse?

Question:

Is that possible to cache StreamingResponse?

I saw, a couple of tickets related to this topic (e.g. here), but none of them gave clear answer.

I tried aiocache package and fastapi-cache package, but all this kind of packages try to convert value being cached to JSON or even a string, which obviously will not work in that case.

Asked By: Mateusz

||

Answers:

There is decorator implemented in https://github.com/Krukov/cashews package.
More details can be found here: https://github.com/Krukov/cashews/issues/107.

Answered By: Mateusz
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.