protected boolean isCacheableColumns(List<UIColumn> columns) {
        // lets cache it only when RENDER_RESPONSE is reached, the columns might change before reaching that phase
        // see https://github.com/primefaces/primefaces/issues/2110
        // do not cache if nested in iterator component and contains dynamic columns since number of columns may vary per iteration
        // see https://github.com/primefaces/primefaces/issues/2154
        return getFacesContext().getCurrentPhaseId() == PhaseId.RENDER_RESPONSE
                && (!ComponentUtils.isNestedWithinIterator(this) || columns.stream().noneMatch(DynamicColumn.class::isInstance));
    }
Recalculates filteredValue after adding, updating or removing TreeNodes to/from a filtered TreeTable.
primefaces/src/main/java/org/primefaces/component/treetable/TreeTable.java