         forSection section: Int
     ) {
         guard let data = self.header(index: section) else { return }
-        data.cacheHeight = view.frame.height
         if let decorView = view as? IQTableDecor {
             decorView.beginDisplay()
         }
+        data.cacheHeight = view.frame.height
     }
 
     @objc

    @objc
    open func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
        let row = self.row(indexPath: indexPath)
        row.cacheHeight = cell.frame.height
        self.visibleCells.append(cell)
        self._updateVisibleIndexPaths(tableView)
        if let cell = cell as? IQTableCell {
            cell.beginDisplay()
        }
    }

    @objc

        forSection section: Int
    ) {
        guard let data = self.footer(index: section) else { return }
        if let decorView = view as? IQTableDecor {
            decorView.beginDisplay()
        }
        data.cacheHeight = view.frame.height
    }

    @objc
