Matrix Inversion using Cache