This commit is contained in:
long2ice
2021-03-20 14:47:46 +08:00
parent 1d0c245a70
commit 8573eeace6

View File

@@ -17,6 +17,9 @@ def default_key_builder(
prefix = f"{FastAPICache.get_prefix()}:{namespace}:" prefix = f"{FastAPICache.get_prefix()}:{namespace}:"
cache_key = ( cache_key = (
prefix + hashlib.md5(f"{func.__module__}:{func.__name__}:{args}:{kwargs}").hexdigest() prefix
+ hashlib.md5( # nosec:B303
f"{func.__module__}:{func.__name__}:{args}:{kwargs}"
).hexdigest()
) )
return cache_key return cache_key