File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- __version__ = "0.1.21 "
1+ __version__ = "0.1.22 "
Original file line number Diff line number Diff line change @@ -55,7 +55,8 @@ def decorator(fn: Callable[P, Awaitable[R]]):
5555 async def wrapper (* args , ** kwargs ):
5656 key = cache_key (* args , ** kwargs )
5757
58- async def _call_with_lock ():
58+ async def _call_with_lock (* args , ** kwargs ):
59+ key = cache_key (* args , ** kwargs )
5960 async with lock (key + ":lock" ):
6061 found = await cache .get (
6162 key
@@ -80,7 +81,7 @@ async def _call_with_lock():
8081 if isinstance (found , CacheItem ):
8182 status = CacheStatus .HIT
8283 if found .is_stale and key not in update_tasks :
83- task = asyncio .create_task (_call_with_lock ())
84+ task = asyncio .create_task (_call_with_lock (* args , ** kwargs ))
8485 update_tasks [key ] = task # TODO: acho que tem problema
8586 task .add_done_callback (lambda _ : update_tasks .pop (key ))
8687 status = CacheStatus .STALE
You can’t perform that action at this time.
0 commit comments