This commit is contained in:
long2ice
2021-01-06 14:41:46 +08:00
parent 7f7252d151
commit 6f5d4900a9
2 changed files with 1 additions and 3 deletions

View File

@@ -33,8 +33,6 @@ def cache(
coder = coder or FastAPICache.get_coder() coder = coder or FastAPICache.get_coder()
expire = expire or FastAPICache.get_expire() expire = expire or FastAPICache.get_expire()
key_builder = key_builder or FastAPICache.get_key_builder() key_builder = key_builder or FastAPICache.get_key_builder()
request = kwargs.pop("request", None)
response = kwargs.pop("response", None)
backend = FastAPICache.get_backend() backend = FastAPICache.get_backend()
cache_key = key_builder(func, namespace, args=args, kwargs=kwargs) cache_key = key_builder(func, namespace, args=args, kwargs=kwargs)
ttl, ret = await backend.get_with_ttl(cache_key) ttl, ret = await backend.get_with_ttl(cache_key)

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "fastapi-cache2" name = "fastapi-cache2"
version = "0.1.3.1" version = "0.1.3.2"
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"