function to clean the cache to reduce memory usage
(self)
| 222 | |
| 223 | |
| 224 | async def clean_cache(self) -> None: |
| 225 | """ |
| 226 | function to clean the cache to reduce memory usage |
| 227 | """ |
| 228 | while True: |
| 229 | await asyncio.sleep(self.clean_timer) |
| 230 | self.cached_file_ids.clear() |
| 231 | logging.debug("Cleaned the cache") |