BUG FIX 2152
When the cache expires, deleting the key from the cache will attempt to acquire a lock, which is not reentrant at this point, leading to suspension.
This commit is contained in:
parent
8ccb9e7597
commit
f18ca3d8a1
1 changed files with 1 additions and 1 deletions
|
|
@ -350,7 +350,7 @@ class AsyncInMemoryCache(AsyncBaseCacheService, Service):
|
||||||
return pickle.loads(item["value"]) if isinstance(item["value"], bytes) else item["value"]
|
return pickle.loads(item["value"]) if isinstance(item["value"], bytes) else item["value"]
|
||||||
else:
|
else:
|
||||||
logger.info(f"Cache item for key '{key}' has expired and will be deleted.")
|
logger.info(f"Cache item for key '{key}' has expired and will be deleted.")
|
||||||
await self.delete(key) # Log before deleting the expired item
|
await self._delete(key) # Log before deleting the expired item
|
||||||
return CACHE_MISS
|
return CACHE_MISS
|
||||||
|
|
||||||
async def set(self, key, value, lock: Optional[asyncio.Lock] = None):
|
async def set(self, key, value, lock: Optional[asyncio.Lock] = None):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue