polars.Expr.cache#

Expr.cache() Self[source]#

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

This can actually hurt performance and can have a lot of contention. It is advised not to use it until actually benchmarked on your problem.