#3115 cache calculations to improve speed when plotting multiple solutions in a partial dependence plot with factor variables.