Cache inverse of matrix.