Added code for the matrix inverse cache assignment