Skip to content

Commit 8733f02

Browse files
committed
include args in cache key
1 parent d064936 commit 8733f02

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

backend/routers/lib/cache.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ def cache(_, hours=2):
126126
def wrapper(func):
127127
@wraps(func)
128128
async def wrapped(*args, **kwargs):
129-
key_parts = [func.__name__] + list(args)
129+
key_parts = (
130+
[func.__name__]
131+
+ list(args)
132+
+ list(kwargs.keys())
133+
+ list(kwargs.values())
134+
)
130135
key = "-".join(str(k) for k in key_parts)
131136
result = store.get(key)
132137

0 commit comments

Comments
 (0)