mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
- Fix redis cache.
- Encode key builder.
This commit is contained in:
@@ -19,7 +19,7 @@ def default_key_builder(
|
||||
cache_key = (
|
||||
prefix
|
||||
+ hashlib.md5( # nosec:B303
|
||||
f"{func.__module__}:{func.__name__}:{args}:{kwargs}"
|
||||
f"{func.__module__}:{func.__name__}:{args}:{kwargs}".encode()
|
||||
).hexdigest()
|
||||
)
|
||||
return cache_key
|
||||
|
||||
Reference in New Issue
Block a user