function to clean the cache to reduce memory usage
(self)
| 227 | |
| 228 | |
| 229 | async def clean_cache(self) -> None: |
| 230 | """ |
| 231 | function to clean the cache to reduce memory usage |
| 232 | """ |
| 233 | while True: |
| 234 | await asyncio.sleep(self.clean_timer) |
| 235 | self.cached_file_ids.clear() |
| 236 | logging.debug("Cleaned the cache") |