polars.Expr.cache#

Expr.cache() Self[source]#

Cache this expression so that it only is executed once per context.

Deprecated since version 0.18.9: This method now does nothing. It has been superseded by the comm_subexpr_elim setting on LazyFrame.collect, which automatically caches expressions that are equal.