Merge branch 'main' into feat/type-hints-covering

# Conflicts:
#	fastapi_cache/coder.py
#	fastapi_cache/decorator.py
This commit is contained in:
Ivan Moiseev
2022-11-03 15:53:22 +04:00
6 changed files with 40 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ def cache(
request: Optional[Request] = copy_kwargs.pop("request", None)
response: Optional[Response] = copy_kwargs.pop("response", None)
if (
request and request.headers.get("Cache-Control") == "no-store"
request and request.headers.get("Cache-Control") in ("no-store", "no-cache")
) or not FastAPICache.get_enable():
return await ensure_async_func(*args, **kwargs)