Based on hozn in #283, this is a simple modification that allow to copy headers if a custom encoder return an instance of a starlette response.
So we can cache binary data with custom response and have all the fastapi-cache header set.