code: def clear_all(self):
          
          for urlpath in self._metadata.keys():
              self.clear_cache(urlpath)
  
          # Safely clean up anything else.
          if not os.path.isdir(self._cache_dir):
              return
          for subdir in os.listdir(self._cache_dir):
              try:
                  fn = posixpath.join(self._cache_dir, subdir)
                  if os.path.isdir(fn):
                      shutil.rmtree(fn)
                  if os.path.isfile(fn):
                      os.remove(fn)
              except (OSError, IOError) as e:
                  logger.warning(str(e))
docs: Clears all cache and metadata.