'Clears the cache if the objective or constraints changed.
Parameters
objective : LinOp
The canonicalized objective.
constraints : list
The list of canonicalized cosntraints.
cached_data : dict
A map of solver name to cached problem data.'

def validate_cache(self, objective, constraints, cached_data):

    prob_data = cached_data[self.name()]
    if ((prob_data.sym_data is not None) and ((objective != prob_data.sym_data.objective) or (constraints != prob_data.sym_data.constraints))):
        prob_data.sym_data = None
        prob_data.matrix_data = None
