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.
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.
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.
There is decorator implemented in https://github.com/Krukov/cashews package.
More details can be found here: https://github.com/Krukov/cashews/issues/107.