code: def _get_cache_contents(self):
          
          if not os.path.isdir(self._path):
              return []
  
          def sort_key(name):
              path, stamp = self._get_cache_dir(name)
              try:
                  return os.stat(stamp).st_mtime
              except OSError:
                  return 0
  
          names = os.listdir(self._path)
          names.sort(key=sort_key, reverse=True)
          return names
docs: Return list of commit hash directories in the cache (containing
          wheels or not), sorted by decreasing timestamp