fastapi-cache
fastapi-cache copied to clipboard
Return cached header fields
The current functionality of fastapi-cache is not returning the cached headers, only the cached body with the regular headers. This limitation is affecting the possible usage of this package in a ForwardAuth middleware of Traefik.
Adding this as a custom method via the @cache decorator is not available.
Can we enable returning the headers by:
- adding a flag to cache and return all headers
- or via a custom method (like
key_builder
) to return selected headers?