mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # fastapi_cache/decorator.py # poetry.lock
This commit is contained in:
@@ -26,6 +26,9 @@ def cache(
|
||||
nonlocal coder
|
||||
nonlocal expire
|
||||
nonlocal key_builder
|
||||
request = kwargs.get("request")
|
||||
if request.headers.get("Cache-Control") == "no-store":
|
||||
return await func(*args, **kwargs)
|
||||
|
||||
coder = coder or FastAPICache.get_coder()
|
||||
expire = expire or FastAPICache.get_expire()
|
||||
|
||||
Reference in New Issue
Block a user