code: def run(self):
          
          logger.info("Starting daemon.")
          while True:
              try:
                  self._scan_disk()
                  do_cleaning, delete_from_index = self._analyze_file_index()
                  if do_cleaning:
                      self._clean_cache(delete_from_index)
              except Exception:
                  logger.exception("Following exception occurred:")
              sleeping_until_time = datetime.datetime.now() + self.scan_interval
              logger.info("Sleeping until %s.", sleeping_until_time)
              time.sleep(self.scan_interval.total_seconds())
docs: Starts cleaning cache in infinite loop.