mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-24 20:47:54 +00:00
ci: fix poetry
This commit is contained in:
@@ -136,7 +136,9 @@ def cache(
|
||||
try:
|
||||
ttl, ret = await backend.get_with_ttl(cache_key)
|
||||
except Exception:
|
||||
logger.warning(f"Error retrieving cache key '{cache_key}' from backend:", exc_info=True)
|
||||
logger.warning(
|
||||
f"Error retrieving cache key '{cache_key}' from backend:", exc_info=True
|
||||
)
|
||||
ttl, ret = 0, None
|
||||
if not request:
|
||||
if ret is not None:
|
||||
@@ -145,7 +147,9 @@ def cache(
|
||||
try:
|
||||
await backend.set(cache_key, coder.encode(ret), expire)
|
||||
except Exception:
|
||||
logger.warning(f"Error setting cache key '{cache_key}' in backend:", exc_info=True)
|
||||
logger.warning(
|
||||
f"Error setting cache key '{cache_key}' in backend:", exc_info=True
|
||||
)
|
||||
return ret
|
||||
|
||||
if request.method != "GET":
|
||||
|
||||
Reference in New Issue
Block a user