Call state.flush_cache():
1) at beginning and end of solver.solve method
2) whenever a model parameter is updated