We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 233835b commit 7a682d1Copy full SHA for 7a682d1
src/fastapi_redis_cache/cache.py
@@ -39,6 +39,8 @@ async def inner_wrapper(*args, **kwargs):
39
create_response_directly = not response
40
if create_response_directly:
41
response = Response()
42
+ if "content-length" in response.headers.keys():
43
+ del response.headers["content-length"]
44
redis_cache = FastApiRedisCache()
45
if redis_cache.not_connected or redis_cache.request_is_not_cacheable(request):
46
# if the redis client is not connected or request is not cacheable, no caching behavior is performed.
0 commit comments