mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
bug fix
This commit is contained in:
@@ -27,7 +27,7 @@ def cache(
|
||||
nonlocal expire
|
||||
nonlocal key_builder
|
||||
request = kwargs.get("request")
|
||||
if request.headers.get("Cache-Control") == "no-store":
|
||||
if request and request.headers.get("Cache-Control") == "no-store":
|
||||
return await func(*args, **kwargs)
|
||||
|
||||
coder = coder or FastAPICache.get_coder()
|
||||
|
||||
Reference in New Issue
Block a user