Set and retrieve the inverse of matrix fro cache