diff --git a/telethon/entitycache.py b/telethon/entitycache.py index 84e17c3c..b6d06b3c 100644 --- a/telethon/entitycache.py +++ b/telethon/entitycache.py @@ -91,6 +91,12 @@ class EntityCache: raise KeyError('No cached entity for the given key') + def clear(self): + """ + Clear the entity cache. + """ + self.__dict__.clear() + def ensure_cached( self, update,