mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
Merge branch 'main' into feat/type-hints-covering
# Conflicts: # fastapi_cache/coder.py # fastapi_cache/decorator.py
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user