update cache invert matrix