mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
bug fix
This commit is contained in:
3
Makefile
3
Makefile
@@ -35,4 +35,7 @@ test: deps
|
|||||||
build: deps
|
build: deps
|
||||||
@poetry build
|
@poetry build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rf ./dist
|
||||||
|
|
||||||
ci: check test
|
ci: check test
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ def cache(
|
|||||||
nonlocal expire
|
nonlocal expire
|
||||||
nonlocal key_builder
|
nonlocal key_builder
|
||||||
request = kwargs.get("request")
|
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)
|
return await func(*args, **kwargs)
|
||||||
|
|
||||||
coder = coder or FastAPICache.get_coder()
|
coder = coder or FastAPICache.get_coder()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "fastapi-cache2"
|
name = "fastapi-cache2"
|
||||||
version = "0.1.3"
|
version = "0.1.3.1"
|
||||||
description = "Cache for FastAPI"
|
description = "Cache for FastAPI"
|
||||||
authors = ["long2ice <long2ice@gmail.com>"]
|
authors = ["long2ice <long2ice@gmail.com>"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user