code: def _GetFirefoxConfig(self, file_object, display_name):
      
      # There ought to be a valid record within the first 4 MiB. We use this
      # limit to prevent reading large invalid files.
      to_read = min(file_object.get_size(), self._INITIAL_CACHE_FILE_SIZE)
  
      while file_object.get_offset() < to_read:
        offset = file_object.get_offset()
  
        try:
          cache_entry, _ = self._ReadCacheEntry(
              file_object, display_name, self._MINIMUM_BLOCK_SIZE)
  
          # We have not yet determined the block size, so we use the smallest
          # possible size.
          record_size = (
              self._CACHE_ENTRY_HEADER_SIZE + cache_entry.request_size +
              cache_entry.information_size)
  
          if record_size >= 4096:
            # _CACHE_003_
            block_size = 4096
          elif record_size >= 1024:
            # _CACHE_002_
            block_size = 1024
          else:
            # _CACHE_001_
            block_size = 256
  
          return self.FIREFOX_CACHE_CONFIG(block_size, offset)
  
        except IOError:
          logger.debug('[{0:s}] {1:s}:{2:d}: Invalid record.'.format(
              self.NAME, display_name, offset))
  
      raise errors.UnableToParseFile(
          'Could not find a valid cache record. Not a Firefox cache file.')
docs: Determine cache file block size.
  
      Args:
        file_object (dfvfs.FileIO): a file-like object.
        display_name (str): display name.
  
      Returns:
        firefox_cache_config: namedtuple containing the block size and first
            record offset.
  
      Raises:
        UnableToParseFile: if no valid cache record could be found.