Rewritten invalidate method