mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 12:59:46 +00:00
Create a new in-memory cache for entities (#1141)
This commit is contained in:
@@ -49,6 +49,7 @@ class UserMethods(TelegramBaseClient):
|
||||
results.append(None)
|
||||
continue
|
||||
self.session.process_entities(result)
|
||||
self._entity_cache.add(result)
|
||||
exceptions.append(None)
|
||||
results.append(result)
|
||||
request_index += 1
|
||||
@@ -59,6 +60,7 @@ class UserMethods(TelegramBaseClient):
|
||||
else:
|
||||
result = await future
|
||||
self.session.process_entities(result)
|
||||
self._entity_cache.add(result)
|
||||
return result
|
||||
except (errors.ServerError, errors.RpcCallFailError,
|
||||
errors.RpcMcgetFailError) as e:
|
||||
|
Reference in New Issue
Block a user